![]() |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
I created router
[PHP]$router = $frontController->getRouter(); $router->addRoute( 'url', new Zend_Controller_Router_Route(':lang/:module/:category/:controller/:action/:test', array('module'=>'default', 'controller' => 'index', 'action' => 'index', 'lang' => 'en', 'category'=> 'categ1')) );[/PHP] when url is http://domain/en/default/pc/index/index/something/ everything works fine. $this->getRequest(); output in Controller is [PHP]["_params rotected"] => array(6) {["lang"] => string(2) "en" ["module"] => string(7) "default" ["category"] => string(2) "pc" ["controller"] => string(5) "index" ["action"] => string(5) "index" ["test"] => string(9) "something" } [/PHP] Problem occurs when I change url, for example remove default index controller and action http://domain/en/default/pc/something/ error is: Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (en)' in C:\wamp\www\ZendFramework-1.0.3\library\Zend\Controller\Dispatcher\Standard. php:198 ... What should I change in router definition if I want that results of these urls: http://domain/en/default/pc/index/index/something/ http://domain/en/pc/index/index/something/ http://domain/en/pc/index/something/ http://domain/en/pc/something/ http://domain/pc/something/ be the same?: [PHP]["_params rotected"] => array(6) {["lang"] => string(2) "en" ["module"] => string(7) "default" ["category"] => string(2) "pc" ["controller"] => string(5) "index" ["action"] => string(5) "index" ["test"] => string(9) "something" }[/PHP] Last edited by zfuser; 01-18-2008 at 10:58 AM. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| Designed by: Miner Skinz |
Powered by vBulletin® Version 3.8.4 Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Search Engine Friendly URLs by vBSEO 3.1.0 |
![]() |