vi nginx/conf/nginx.conf
1.修改正则
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 PATH_INFO $path_info; include fastcgi_params;
2.location ~ .php{} 把$去掉,$匹配url只匹配到.php前