Thanks, That does work. One thing tough, How can i make a custom
class/helper/plugin what ever, for each module to have it's own router
routes. I mean if i have the module 'front' i would like to create a class
named FrontRoutes and have a function that will hold down all the rewrites
for that module.

Hope that makes sense, I am just trying to see how far this can be used.

Thanks.

On Wed, Mar 4, 2009 at 10:30 AM, Matthias W. <
[email protected]> wrote:

>
> I did it in my Initialize.php
>
> If you haven't got the Initialize.php you have to do it in your
> bootstrap.php (in the bootstrap you have to do it without the function, the
> $this->_front is the instance of the front controller)
>
>
> public function initRoutes()
> {
>    $defaults   = array(
>        'lang'          => 'en',
>        'module'        => 'default',
>        'controller'    => 'index',
>        'action'                => 'index',
>    );
>
>    $route = new
> Zend_Controller_Router_Route(':module/:lang/:controller/:action/*',
> $defaults);
>
>    $router = $this->_front->getRouter();
>    $router->addRoute('route_name', $route);
> }
>
>
> vince. wrote:
> >
> > If i have the following:
> >
> > xyz.com/:module/[lang]/:controller/:action/*<http://xyz.com/:module/%5Blang%5D/:controller/:action/*>
> >
> > how can i make it so it will actually dispatch the
> > xyz.com/:module/:controller/:action/* but will show the [lang] in there.
> I
> > know using a router but how exactly?
> >
> > Thanks.
> >
> > --
> > Vincent Gabriel.
> > Lead Developer, Senior Support.
> > Zend Certified Engineer.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Discard-one-variable-in-the-url-using-a-router-maybe-tp22325208p22325650.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Vincent Gabriel.
Lead Developer, Senior Support.
Zend Certified Engineer.

Reply via email to