简单配置nginx使之支持pathinfo

只需要修改3个地方就可以了:(nginx配置文件)

location ~ \.php { #去掉$
root H:/PHPServer/WWW;
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;
}

posted on 2017-11-03 14:37  欧耶d  阅读(514)  评论(0编辑  收藏  举报

导航