server {
listen 80;
server_name sx.snail.com;
index index.PHP index.html;
root /var/www/html/snail;
location ~ \.PHP$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.PHP)(/.+)$;
fastcgi_pass PHP:9000;
fastcgi_index index.PHP;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location / {
# !!!url重写!!! 省略index.PHP
if (!-e $request_filename) {
rewrite ^/index.PHP(.*)$ /index.PHP?s=$1 last;
rewrite ^(.*)$ /index.PHP?s=$1 last;
break;
}
}
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。