nginx 配置thinkphp 隐藏index.php 并支持pathinfo

     if (!-e $request_filename) {
	   rewrite ^/index.php(.*)$ /index.php?s=$1 last;
	   rewrite ^(.*)$ /index.php?s=$1 last;
	   break;
	}
	location ~ .*\.(php|php5)?$
	{
		#fastcgi_pass  unix:/tmp/php-cgi.sock;
		fastcgi_pass  127.0.0.1:9000;
		fastcgi_index index.php;
		fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param  QUERY_STRING     $query_string;
        include fastcgi_params;
	}

  

posted @ 2019-05-16 12:12  winstonsias  阅读(192)  评论(0编辑  收藏  举报