Just add another route.. but take care they are you add them in order (most
general -> most specific):

$default = new Zend_Controller_Router_Route(
                        ':lang/:controller/:action/*',
                                        array('controller'=>'index',
                                                'action' => 'index',
                                                'module'=>'default',
                                                'lang'=>$lang));

$admin = new Zend_Controller_Router_Route(
                        'admin/:controller/:action/*',
                                        array('controller'=>'index',
                                                'action' => 'index',
                                                'module'=>'admin',
                                                ));

$front     = Zend_Controller_Front::getInstance();
                $router = $front->getRouter();
                $router->addRoutes ( array('default' => $default, 'admin' => 
$admin );
                $front->setRouter($router);


Flirt4 wrote:
> 
> Hello all!
> I`m new to zend, and I have some difficult with zend router. I have site +
> admin area on zend framework. Now i need to add some languages to my site.
> I do it and all is ok, now my router in bootstrap.php look like this : 
> 
> $route = new Zend_Controller_Router_Route(
>                       ':module/:lang/:controller/:action/*',
>                                       array('controller'=>'index',
>                                               'action' => 'index',
>                                               'module'=>'default',
>                                               'lang'=>$lang));
> 
>               $front     = Zend_Controller_Front::getInstance();
>               $router = $front->getRouter();
>               $router->addRoute ( 'default', $route );
>               $front->setRouter($router);
> 
> Now all is working fine but there are one think that i dont like - in my
> site all links including "default" - module text.
> http://localhost/default/en/products/index/cat/16 . And when i go to the
> admin - http://localhost/admin/en/add/products/ . I don`t want in my site
> to include default module text "default" and I don`t need languages param
> in admin area( i need to be like this
> http://localhost/en/products/index/cat/16 and for admin -
> http://localhost/admin/add/products/ ) . Can somebody help me to resolve
> this? Thank you in advance!
> 

-- 
View this message in context: 
http://www.nabble.com/ZF-Custom-Router-tp26052315p26067209.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to