求一份在nginx中配置thinkphp伪静态的代码?

【字号: 日期:2022-07-19浏览:28作者:雯心

问题描述

ThinkPHP在nginx下url重写Rewrite规则伪静态

问题解答

回答1:

server { location / { index index.htm index.html index.php; try_files $uri /index.php$uri; } location ~ .+.php($|/) { root/var/www/thinkphp; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^(.+.php)(/.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; includefastcgi.conf; } }

相关文章: