我已经设置了这组.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文件夹只包含.htaccessand index.php,没有别的。
重写规则应该通过 index.php 将所有请求发送到不存在的文件。这发生在/herp/derp/(无论控制器是否存在),但不适用于/index/herp/或任何其他以/index/.
所有/index/*url 都被路由到 apache 的 404 页面,所有其他 url 都可以工作。
我应该如何解决这个问题?