Reputation: 15887
I have a site with some static pages that lie in à folder called ../application/default/views/scripts/statiskt/student/(index.html) (seen from the webroot).
I can access these "static" pages via mydomain.se/statiskt/student/(index.html).
The problem is that i want to be able to access them via mydomain.se/student/(index.html).
I am using the Zend Framework with the Zend router.
I am barely familiar with the Zend Framework, so i'm asking you - Is this possible? And how do i achieve it?
Sent from an iPhone with weird spellchecking, sorry for any typos.
Upvotes: 0
Views: 280
Reputation: 316959
Have you tried to modify any of the examples from the ZF Manual on Routes?
$route = new Zend_Controller_Router_Route_Static(
'student',
array('controller' => 'statiskt',
'action' => 'student')
);
$router->addRoute('staticStudent', $route);
If there is no controller and action for the static pages, e.g. they are not used with ZF's MVC components, then rewrite the URL from the .htaccess
in your /pub
folder to point to the appropriate path. See http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
Upvotes: 1