conf文件找到localtion设置
location ~ 1.php(/|$) {
因为不支持pathinfo,要把配置改为:
location ~ ..php(/.)*$ {
在location加入
set $path_info "";
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
reboot Nginx service。
- / ↩