lnmp支持thinkphp的PATH_INFO模式解决方案
1、修改php.ini
cgi.fix_pathinfo=1
2、修改nginx.conf
注释掉include enable-php.conf
添加include enable-php-pathinfo.conf
3、重写规则
location / {
if (!-e $request_filename) {
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
index index.html index.htm index.php l.php;
autoindex off;
}
4、重启