Chinaunix首页 | 论坛 | 博客
  • 博客访问: 317576
  • 博文数量: 172
  • 博客积分: 2967
  • 博客等级: 少校
  • 技术积分: 1805
  • 用 户 组: 普通用户
  • 注册时间: 2011-09-09 13:31
文章分类

全部博文(172)

文章存档

2014年(6)

2013年(45)

2012年(120)

2011年(1)

我的朋友

分类: LINUX

2014-02-17 14:38:29

问题:

        

404 Not Found


nginx/1.4.4


解决:

1.nginx wiki给出了基于配置文件的方法




fastcgi_split_path_info
Syntax: fastcgi_split_path_info regex
Default:
Context: location
Reference: fastcgi_split_path_info


This directive allows the setting of the SCRIPT_FILENAME (SCRIPT_NAME) and PATH_INFO variables of the CGI specification. The regex consists of two groups:


path to the script that will handle the request — corresponding to $fastcgi_script_name.
the value of the parameter to be given to the script — corresponding to the $fastcgi_path_info.


Here's an example. The script show.php receives as argument the string article/0001. The following configuration will handle path splitting properly:

location ~ ^.+\.php { #我实际使用的是 \.php/?.*$
(...) 
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$; 
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
fastcgi_param PATH_INFO $fastcgi_path_info; 
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 
(...) 
}

将斜体放入fastcgi的php脚本中,问题就可以解决
阅读(8349) | 评论(0) | 转发(0) |
0

上一篇:信用卡利率计算

下一篇:没有了

给主人留下些什么吧!~~