thinkphp5 tp5 与 nginx 搭配在根目录和子目录中如何设置伪静态

配置文件参考一下:

location /public/ { if (!-e $request_filename){ rewrite ^/public/(.*)$ /public/index.php?s=http://www.likecs.com/$1 last; } } location /public2/ { if (!-e $request_filename){ rewrite ^/public2/(.*)$ /public2/index.php?s=http://www.likecs.com/$1 last; } } location / { if (!-e $request_filename){ rewrite ^/(.*)$ /index.php?s=http://www.likecs.com/$1 last; } }

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

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