nignx 502错误不能使用/的路径方式 即pathinfo

在server中加入

include enable-php-pathinfo.conf;

引入nginx.conf下的这个文件即可.

如果是tp框架,主要隐藏index.php的入口文件,再加入下面这段

location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}

posted @ 2017-09-14 14:38  天国的恩赐  阅读(285)  评论(0编辑  收藏  举报