Routing: Module alias

For programming and general questions on Zend Framework
Post Reply
Posts: 1
Joined: Fri Sep 02, 2011 3:35 pm

Routing: Module alias

Post by reinierkip » Fri Sep 02, 2011 3:50 pm

What is the best way to create a "module alias"? I'd like to map `/my-module-alias/controller/action` to `/module/controller/action`, and vice versa (when assembling URLs for a specific module/controller/action), where `my-module-alias` can be any valid name I configure. All other routes still behave as "normal" (using Zend_Controller_Router_Route_Module).

- `/alias1/index/index` maps to the aliased module users, controller index, action index.
- `/archive/index/index` just maps to module archive, controller index, action index.
- `$route->assemble(array('module' => 'users', 'controller' => 'index', action => 'index'));` would return `/alias1/index/index`


Posts: 1
Joined: Wed Dec 26, 2012 12:20 pm

Re: Routing: Module alias

Post by inri13666 » Wed Dec 26, 2012 12:21 pm


Post Reply