【发布时间】:2017-03-29 10:34:36
【问题描述】:
下面你会看到我的服务器部分工作得很好,但现在我必须“模拟”一个不存在的 php 文件。
location ~ \.php$
{
fastcgi_pass php;
include fastcgi.conf;
}
try_files $uri $uri/ /index.php?$uri&$args;
我的所有 url 当前都被重写了,因为我的 index.php 的 try_files 设置,但如果我尝试访问 domain.tld/something.php 则不会。
我怎样才能使这些位置块/s 使domain.tld/something**.php** 使用我的try_files 并将其发送到index.php?
提前致谢。
【问题讨论】:
标签: php nginx url-rewriting location