【发布时间】:2012-04-25 20:27:09
【问题描述】:
我已经设置了这组.htaccess 重写(Zend Framework 默认重写规则):
重写引擎开启
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
重写规则 ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
我的DocumentRoot 文件夹仅包含.htaccess 和index.php,没有其他内容。
重写规则应该通过 index.php 将所有请求发送到不存在的文件。
这发生在/herp/derp/(无论控制器是否存在),但不适用于/index/herp/ 或任何其他以/index/ 开头的url。
所有/index/* url都被路由到apache的404页面,所有其他url都可以。
我应该如何解决这个问题?
【问题讨论】:
标签: .htaccess mod-rewrite apache2.2