Thinkphp 在** nginx** 开启pathinfo 可以不隐藏 index.php吗?
比如
http://www.xxx.com/index.php/admin
http://www.xxx.com/admin
这两个域名我都能正常的访问我的后台。
把thinkphp的 .htcess去掉试试
可以的,在nginx.conf配置文件或者自定义的文件下,修改一下location。将 下面代码的第一句修改成: location ~ .php($|/){
location ~ .php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}