【发布时间】:2014-05-16 21:20:35
【问题描述】:
这是我的 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。
如何解决这个问题?
【问题讨论】: