我有一个站点,其中包含一些静态页面,这些页面位于名为../application/default/views/scripts/statiskt/student/(index.html)的文件夹中(从webroot查看)。
我可以通过mydomain.se/statiskt/student/(index.html)访问这些“静态”页面。
问题是我想通过mydomain.se/student/(index.html)访问它们。
我正在使用Zend框架和Zend路由器。
我几乎不熟悉Zend框架,所以我想问你——这可能吗?我如何做到这一点?
从一个带有奇怪拼写检查的iPhone上发送的,很抱歉有任何拼写错误。
你有没有试过修改 ZF Manual on Routes
$route = new Zend_Controller_Router_Route_Static( 'student', array('controller' => 'statiskt', 'action' => 'student') ); $router->addRoute('staticStudent', $route);
如果静态页面没有控制器和操作,例如它们没有与ZF的MVC组件一起使用,那么从 .htaccess /pub http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
.htaccess
/pub