{
#地址作为将参数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
最佳答案