强制RewriteRule使用以前的RewriteRule的结果

时间:2013-02-01 20:56:30

标签: .htaccess zend-framework mod-rewrite

我正在寻找一种方法来强制.htaccess文件中的RewriteRule使用以前的RewriteRule的结果。

我有以下规则:

RewriteRule ^this-controller/this-action.*$ /that-controller/that-action

这样可以正常工作,但我正在使用Zend Framework,它需要额外的规则来将所有请求路由到index.php进行处理。

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_URI} !server-status
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

结果是以下错误:

'Invalid controller specified (this-controller)'

似乎是使用原始网址(this-controller/this-action)将请求重定向到index.php。如何让它将重写URL(/that-controller/that-action)传递给index.php呢?

0 个答案:

没有答案
相关问题