Mod rewrite RewriteCond(htaccess),用于排除Zend framework处理的URL
以下是Mod rewrite RewriteCond(htaccess),用于排除Zend framework处理的URL,mod-rewrite,zend-framework,Mod Rewrite,Zend Framework,以下是Zend应用程序的mod_rewrite配置(请参阅) 我得到了以下例外: 'ERROR CODE: 54dedae933247 - Page not found: exception \'Zend_Controller_Dispatcher_Exception\' with message \'Invalid controller specified (server-status)\' in /usr/share/php/project/libraries/library/Zend/Co
Zend
应用程序的mod_rewrite
配置(请参阅)
我得到了以下例外:
'ERROR CODE: 54dedae933247 - Page not found: exception \'Zend_Controller_Dispatcher_Exception\' with message \'Invalid controller specified (server-status)\' in /usr/share/php/project/libraries/library/Zend/Controller/Dispatcher/Standard.php:248
Stack trace:
#0 /usr/share/php/project/libraries/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /var/www/myapp/application/My_Bootstrap.php(255): Zend_Controller_Front->dispatch()
#2 /usr/share/php/project/libraries/library/Zend/Application.php(366): My_Bootstrap->run()
#3 /var/www/myapp/public/index.php(43): Zend_Application->run()
#4 {main}'
我想我可以通过扩展Zend\u Controller\u Action
排除此URL,并在preDispatch
中排除此URL,但我不想这样做,因为我必须更改代码,对于其他相同的情况,我必须更改代码(脏解决方案),有时我无法访问代码
要排除/服务器状态
,我必须包括哪些条件
RewriteCond %{REQUEST_URI} !=/server-status [NC]
RewriteCond %{REQUEST_URI} !^/server-status* [NC]
RewriteCond %{REQUEST_URI} !(server-status) [NC]
'ERROR CODE: 54dedae933247 - Page not found: exception \'Zend_Controller_Dispatcher_Exception\' with message \'Invalid controller specified (server-status)\' in /usr/share/php/project/libraries/library/Zend/Controller/Dispatcher/Standard.php:248
Stack trace:
#0 /usr/share/php/project/libraries/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /var/www/myapp/application/My_Bootstrap.php(255): Zend_Controller_Front->dispatch()
#2 /usr/share/php/project/libraries/library/Zend/Application.php(366): My_Bootstrap->run()
#3 /var/www/myapp/public/index.php(43): Zend_Application->run()
#4 {main}'