【发布时间】:2014-09-20 18:01:13
【问题描述】:
我在 .htaccess 中有一个包含以下内容的项目。
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L,NC,QSA]
我在一个目录中有两个文件 test.txt & test.php
我可以访问/path/to/folder/test.txt,但不能访问/path/to/folder/text.php。
我错过了什么?此配置之前在其他服务器上确实有效。
【问题讨论】:
-
请附加网络服务器error log 和rewrite log。您应该始终在问题中包含调试信息,没有它,它更像是在猜测问题。
标签: php apache url mod-rewrite