首页 >php教程 >php手册 >Nginx配置支持rewrite

Nginx配置支持rewrite

WBOY
WBOY原创
2016-06-07 11:37:331622浏览

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;
}

AD:真正免费,域名+虚机+企业邮箱=0元

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn