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/*
>
> 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.