lnmp配置支持thinkphp和nginx路由url重写

修改nginx.conf或者vhost/*.conf

注释掉include enable-php.conf 添加include enable-php-pathinfo.conf

step3:
加入重写规则

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; }

step4:
重启lnmp

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zypxjy.html