+-
nginx thinkphp伪静态配置,重写url不正确,求解答

环境:

nginx:nginx/1.18.0
php: 5.6.40
centos 6.5 linux 内核 2.6.32-431.el6.x86_64

nginx thinkphp伪静态配置,重写url不正确(旧项目用地thinkPHP3.2.3和新的thinkPHP5.1)

nginx配置:

server {

 listen       8082;
 server_name  xxx.xxx.xxx.xxx;

 location / {
     root   /usr/share/nginx/xxx;
     index  index.html index.htm index.php;
     if (!-e $request_filename) {
         rewrite  ^(.*)$  /index.php?s=$1  last;
         break;
     }
     proxy_read_timeout 600;
     proxy_ignore_client_abort on;

 }

 #error_page  404              /404.html;
 # redirect server error pages to the static page /50x.html
 #
 error_page   500 502 503 504  /50x.html;
 location = /50x.html {
     root   /usr/share/nginx/html;
 }
 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
 #
 location ~ \.php {
     root           /usr/share/nginx/xxx;
     fastcgi_read_timeout 600;
     fastcgi_pass   127.0.0.1:9000;
     fastcgi_index  index.php;
     fastcgi_split_path_info ^(.+\.php)(.*)$;     
     fastcgi_param PATH_INFO $fastcgi_path_info;   
     fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
     include        fastcgi_params;
 }
client_max_body_size 8M;

}