Locate the/usr/local/webserver/nginx/conf/nginx.conf file (environment configuration is different, the path may not be the same)
And in the server {... Omitted code to add the following code (if the program is placed in the root directory with a first-level directory code, placed in the level two directory, please use the level two directory code), and then restart Nginx:
############## #开启pathinfo支持(Please ignore here if it is turned on) ##############
Location ~ \.php {Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Include fcgi.conf;
Set $real _script_name $fastcgi _script_name;
if ($fastcgi _script_name ~ "^ (. +?\.php) (/.+) $") {
Set $real _script_name $;
Set $path _info;
}
Fastcgi_param script_filename $document _root$real_script_name;
Fastcgi_param script_name $real _script_name;
Fastcgi_param path_info $path _info;}
############## #配置伪静态 (hidden index.php in a level directory) ##############
if (!-e $request _filename) {
# # #程序放在一级目录下 (eg: http://www.phpshe.com/)
Rewrite ^/(. *) $/index.php/$1 last;
}
############## #配置伪静态 (hidden under Level Two directory index.php) ##############
if (!-e $request _filename) {
# # #程序放在二级目录下 (eg: http://www.phpshe.com/shop/)
Rewrite ^/two level directory name/(. *) $/Two level directory name/index.php/$1 last;
}
Phpshe-commerce Mall system Configuration Nginx support PathInfo and rewrite notation