【发布时间】:2011-12-11 01:46:40
【问题描述】:
我正在定义 mod_rewrite 规则,如果请求的文件不存在,它将重写我的 /application.php 的所有请求,否则不会进行任何重写。很简单:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule .* application.php [PT]
代码只有一个问题。假设我有 foo.html 文件。然后请求如下:
http://example.com/foo.html/some/other/string
会出现 404 错误。 为什么?
【问题讨论】:
标签: apache mod-rewrite