ReLinux主机宝或纯环境开启PATHINFO的方法
你好 请问下ECS nginx 环境下 怎么开启pathinfo呢
-------------------------
Re回2楼acunion的帖子
请教下我的这个配置文件要怎么修改才行呢?我已经修改不下20次了还是没能弄好,还望你能赐教下指点一二。谢谢了。
server {
listen 80;
server_name localhost;
index index.html index.htm index.php;
root /alidata/www/phpwind;
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
#path_info
set $real_script_name $fastcgi_script_name;
set $path_info "";
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
#伪静态规则
include /alidata/server/nginx/conf/rewrite/phpwind.conf;
access_log /alidata/log/nginx/access/phpwind.log;
}