0

我正在尝试通过我在服务器上构建的 index.php 文件转发对http://files.domain.com的所有 PDF 请求。首先,我只需要一个测试。所以我把这个htaccess放在一起:

RewriteEngine On
RewriteBase /
RewriteRule file2.pdf index.php [R]

当我访问该 URL 时,它不会显示我的 index.php,而只会显示 404 错误。我不确定发生了什么...有什么建议吗?

我已经确认我的 .htaccess 和 index.php 位于正确的位置。

4

1 回答 1

0

原来我的虚拟主机已AllowOverride设置为NONEhttp ://httpd.apache.org/docs/2.2/mod/core.html#allowoverride

于 2012-08-17T14:11:43.373 回答