Try use: Zend_Controller_Front::removeDefaultRoutes() method.
Ian Warner-3 wrote:
>
> I am definitely missing something here:
>
>
>
> $locale = new Zend_Locale();
>
> $lang = in_array($locale->getLanguage(), array('en','us','fr','de')) ?
> $locale->getLanguage() : 'en';
>
>
>
> $router = new Zend_Controller_Router_Rewrite();
>
> $router->addRoute('default', new
> Zend_Controller_Router_Route(':lang/:module/:controller/:action/',
> array('controller'=>'index','action' =>
> 'index','module'=>'default','lang'=>$lang)));
>
>
>
> // Setup controller
>
> $frontController = Zend_Controller_Front::getInstance();
>
> $frontController->throwExceptions(true);
>
> $frontController->setControllerDirectory(array(
>
> 'default' => 'controllers',
>
> 'online' => 'online/controllers',
>
> 'signup' => 'signup/controllers',
>
> 'tests' => 'tests/controllers'
>
> ));
>
>
>
> // Setup the Language element
>
> $translate = new Zend_Translate('gettext', 'locale/signup/en/en.mo',
> 'en');
>
> Zend::register('translate', $translate);
>
>
>
> // Setup view
>
> $view = new Zend_View();
>
> $view->setScriptPath('views');
>
> $view->addScriptPath('signup/views');
>
> Zend::register('view', $view);
>
>
>
> // Run
>
> $frontController->dispatch();
>
>
>
> Can anyone spot the obvious error - as at the moment I get with -
> http://localhost/HoTxt/en/signup
>
>
>
> ith message 'Invalid controller specified (en)' in
>
>
>
> Cheers
>
>
>
> Ian
>
>
>
--
View this message in context:
http://www.nabble.com/Routing-tf3328631s16154.html#a9255357
Sent from the Zend Framework mailing list archive at Nabble.com.