Nginx配置支持rewrite
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
if (!-e $request_filename) #支持thinkphp
{
rewrite ^/([^(public_inf)].*)$ /index.php?s=$1 break; # 隐藏index.php
break;
}