ThinkPHP3.2.3 Nginx pathinfo & URL重写

 server {
    listen 80;
    server_name 192.168.33.10 dev.me;
    root /var/www/html;
    index index.php index.html;

    client_max_body_size 25M;

    error_log /var/log/nginx/error.log;
    access_log  /var/log/nginx/access.log;

    location / {
       if (!-e $request_filename) {
          rewrite  ^(.*)$  /index.php?s=$1  last;
           break;
         }
    }

    location ~ [^/]\.php(/|$) {
      fastcgi_split_path_info ^(.+?\.php)(/.*)$;
      fastcgi_param  PATH_INFO $fastcgi_path_info;
      fastcgi_pass 127.0.0.1:9000;
      fastcgi_index index.php;
      include fastcgi.conf;
  }
}

你可能感兴趣的:(PHP)