簡單配置nginx使之支持pathinfo

只須要修改3個地方就能夠了:(nginx配置文件)php

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;
}nginx

相關文章
相關標籤/搜索