RewriteRule 问题

浏览:477 发布日期:2013/11/12 分类:求助交流 关键字: RewriteRule
if (!-e $request_filename)
{
#地址作为将参数rewrite到index.php上。
rewrite ^/(.*)$ /index.php/$1;
#若是子目录则使用下面这句,将subdir改成目录名称即可。
#rewrite ^/subdir/(.*)$ /subdir/index.php/$1;
}

发现一个问题,如果这样设置,
地址可以重定向
比如:
重启Nginx以后,http://localhost/project/Index/insert, http://localhost/project/index.php/Index/delete 这样的URL

但问题是index.php后面加一个/就会502 Bad Gateway报错,好像与隐藏index.php没有什么关系,这是什么问题

nginx/1.5.2
php 5.5.1
最佳答案
评论( 相关
后面还有条评论,点击查看>>