现在php.ini里开启pathinfo
在nginx配置文件里添加
#配置pathinfo
if (!-e $request_filename) {
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
添加到server 模块里。
本文介绍如何在nginx配置文件中设置PathInfo,实现对PHP应用程序URL重写的优化处理。
现在php.ini里开启pathinfo
在nginx配置文件里添加
#配置pathinfo
if (!-e $request_filename) {
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
添加到server 模块里。
719
3518

被折叠的 条评论
为什么被折叠?