lnmp环境下 tp3.2 not found

最近将一个lamp环境下使用tp3.2 开发的项目迁移到本地了,

但是在打开项目的时候,提示 not found,经过多方面查找发现是伪静态问题,解决方法如下:

在nginx 域名配置文件我这里是【vhost.conf】里添加

location / {
        root   /www/58coin/pc/;
        index  index.html index.htm index.php ;

        #ThinkPHP REWRITE支持
        if (!-e  $request_filename) {
            rewrite ^/(.*)$ /index.php?s=$1 last;
        }
}

重启nginx,搞定

参考资料

https://blog.csdn.net/u010295544/article/details/78403544

https://yq.aliyun.com/ziliao/46421

猜你喜欢

转载自www.cnblogs.com/jxkshu/p/9026977.html