下面是我的nginx设置
location / {
try_files $uri $uri/ /index.php$uri?$args;
}当我转到url mydomain.com/something.php?arg1=2时,它会在根目录中查找something.php,然后返回file not found message。
但我需要的是,如果根目录中没有与当前路由匹配的.php文件,则使用当前url作为index.php的参数,如index.php/something.php?arg1=2。
如何解决这个问题?
发布于 2014-04-04 22:41:24
尝试:
try_files $uri $uri/ /index.php?q=$uri&$args;因为您的版本要查找index.php/something.php,所以index.php必须是一个目录。
https://stackoverflow.com/questions/22864868
复制相似问题