我在 Mac OS X Lion 上安装了一个 ZF 1.12 项目。当我将浏览器指向……
http://localhost/~myusername/zendproj/public/index/index
时,它会按预期加载页面。它也适用于 Index 控制器中的其他操作。前任:
http://localhost/~myusername/zendproj/public/admin/index
当我查看其他控制器时
http://localhost/~myusername/zendproj/public/admin/index
……我收到此错误
An error occurred
Page not found
Exception information:
Message: Invalid controller specified (~name)
Stack trace:
#0 /usr/local/zend/share/ZendFramework/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /usr/local/zend/share/ZendFramework/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#2 /usr/local/zend/share/ZendFramework/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#3 /Users/myusername/Sites/zendproj/public/index.php(26): Zend_Application->run()
#4 {main}
Request Parameters:
array (
'controller' => '~myusername',
'action' => 'zendproj',
'public' => 'admin',
'module' => 'default',
)
为什么我的 vhost/.htaccess 配置适用于一个控制器而不适用于另一个?谢谢