Zend Framework problem with URL mapping?

The default controller is IndexController The (default) mapping works like this: IndexController::indexAction /index => IndexController::indexAction /index/foo => indexController::fooAction /foo => FooController::indexAction So, add a user defined route like this (will have lower priority than the default) $frontController = Zend_Controller_Front::getInstance(); $router = $frontController->getRouter(); $route = new Zend_Controller_Router_Route( '/:action', array( 'controller' => 'index' ) ); $router->addRoute('user', $route) This did not break my use of the default routes Edit: As coffeerings said in the comment, this will break the indexAction of non-default controllers.

The default controller is IndexController. The (default) mapping works like this: / => IndexController::indexAction /index => IndexController::indexAction /index/foo => indexController::fooAction /foo => FooController::indexAction So, add a user defined route like this (will have lower priority than the default) $frontController = Zend_Controller_Front::getInstance(); $router = $frontController->getRouter(); $route = new Zend_Controller_Router_Route( '/:action', array( 'controller' => 'index' ) ); $router->addRoute('user', $route); This did not break my use of the default routes. Edit: As coffeerings said in the comment, this will break the indexAction of non-default controllers.

Nearly :) it works for all but the default actions in other controllers. So indexController methods /, /index and /testme work but in testController only /test/index and /test/testme work the default /test/ action fails. – coffeerings Jan 5 '09 at 15:16 Ah -- I don't actually use the index method of another controller, in my first tiney Zend app.

– gnud Jan 5 '09 at 19:14.

Domain. Com/index/my-page to domain. Com/my-page how do you think this should work?

In "domain. Com/my-page" my-page is not an action but a controller so if there is no my-page controller with an index action you get a 404. If the rule is /:controller/:action then that's the rule.

Why don't you use vars? If you explain more clearly what exactly you want to do, ppl might be able to come up with practical solutions.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions