Question

I have created controller : module/default/index/login I have added routing in main bootstrap

        $router = Zend_Controller_Front::getInstance()->getRouter();
        $route = new Zend_Controller_Router_Route(':action', array(
            'module'     => 'default',
            'controller' => 'index',

        ));
        $router->addRoute('defaulth', $route);

When i accessing url/login it work fine

After that I have created another controller : module/user/index/register

When i access url/user/register it return error invalid action

When i access url/user/index/register it works fine.

I have to access with url/user/register

Please suggest any one.

Was it helpful?

Solution

I don't know if the name of the route was voluntary (defaulth), but with default you'll overwrite ZF's default main routing, which is :module\:controller\:action\*.

Try :controller\:action\* as the route.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top