Routing: Module alias

For programming and general questions on Zend Framework

Routing: Module alias

Postby reinierkip on 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: Fri Sep 02, 2011 3:35 pm

Re: Routing: Module alias

Postby inri13666 on Wed Dec 26, 2012 12:21 pm

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

Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 4 guests