I searched a lot of methods on the Internet but didn't work. After a day of research, I found that the situation of 'URL_MODEL' => 2 can be perfectly supported through the following configuration
Copy the code The code is as follows:
location /project/ {
index index.php;
if (!-e $request_filename) {
rewrite ^/project/(.*)$ /project/index.php/$1 last;
break;
}
}
location ~ .+. php($|/) {
set $script $uri;
set $path_info "/";
if ($uri ~ "^(.+.php)(/.+)") {
set $script $1;
set $path_info $2;
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php?IF_REWRITE=1;
include /APMServ/nginx/conf/fastcgi_params;
fastcgi_param PATH_INFO $path_info;
fastcgi_para m SCRIPT_FILENAME $document_root/$ script;
fastcgi_param SCRIPT_NAME $script;
}
The above has introduced the method sharing of thinkpad win7 oem to enable Nginx to support ThinkPHP URL rewriting and PATHINFO, including the content of thinkpad win7 oem. I hope it will be helpful to friends who are interested in PHP tutorials.