Nginx配置PATHINFO隐藏thinkphp index.php
程序员文章站
2022-03-18 13:40:37
nginx配置pathinfo隐藏index.php
nginx配置文件里放入这段代码
server {
listen 80;
defaul...
nginx配置pathinfo隐藏index.php
nginx配置文件里放入这段代码
server { listen 80; default_type text/plain; root /var/www/html; index index.php index.htm index.html; #隐藏index.php location / { if (!-e $request_filename) { #一级目录 # rewrite ^/(.*)$ /index.php/$1 last; #二级目录 rewrite ^/myapp/(.*)$ /myapp/index.php/$1 last; } } #pathinfo设置 location ~ \.php($|/) { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param path_info $fastcgi_path_info; fastcgi_param script_filename $document_root$fastcgi_script_name; include fastcgi_params; } }
推荐阅读
-
thinkphp的nginx配置
-
ThinkPHP33 Nginx pathinfo & URL重写
-
nginx支持thinkphp的pathinfo
-
nginx+php-fpm组合解决PATHINFO最佳配置
-
thinkpad win7 oem 让Nginx支持ThinkPHP的URL重写和PATHINFO的方法分享
-
nginx 404页面处理以及pathInfo和隐藏index.php总述
-
ThinkPHP框架里隐藏index.php
-
修改apache配置文件去除thinkphp url中的index.php
-
解决nginx不支持thinkphp中pathinfo的问题
-
修改apache配置文件去除thinkphp url中的index.php