Configure thinkPHP and wnmpthinkphp in the wnmp Integrated Environment
I checked a lot of solutions on the Internet. The following is a method that I have tested. You only need to add content to the nginx. conf file.
Open the nginx. conf file
# Try the requested URI as files before handling it to PHP. location/{# Add the following content here to the root directory of your site location/{root F:/study/wnmp/html; index index.html index.htm; # if the file in the access path does not exist, rewrite the URL and forward it to ThinkPHP for processing if (! -E $ request_filename) {rewrite ^/(. *) $/index. php/$1 last; break ;}} location ~ \. Php /?. * $ {Root F:/study/wnmp/html; fastcgi_pass 127.0.0.1: 9001; fastcgi_index index. php; # Load Nginx default "server environment variable" configuration include fastcgi_params; include fastcgi. conf; # set PATH_INFO and rewrite SCRIPT_FILENAME, SCRIPT_NAME server environment variable set $ fastcgi_script_name2 $ fastcgi_script_name; if ($ fastcgi_script_name ~ "^ (. + \. Php )(/. +) $ ") {set $ region $1; set $ path_info $2;} fastcgi_param PATH_INFO $ path_info; fastcgi_param SCRIPT_FILENAME $ document_root $ region; fastcgi_param SCRIPT_NAME $ region ;} # The last part is for css, js, images, and other resource location ~ * ^. + \. (Jpg | jpeg | gif | png | bmp | css | js | swf) $ {access_log off; root F:/study/wnmp/html; break ;}