nginx 首先server 因过来,
location ~ (.+\.php)($|/) {
root /share/nweb;
set $aa "hell";
set $a "hello world";
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.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;
}
首先 透过配置 location 吧访问请求带过来。然后调用 fastcgi_split_path_info 正则 分割 url
影响 $fastcgi_path_info 和$fastcgi_script_name
来完美支持 thinkphp