On Sun, Oct 19, 2008 at 7:25 AM, TimTowdi <[EMAIL PROTECTED]> wrote:
>
> I want all actions for my IndexController to work using only the action name,
> and actually redirecting if the index controller name is used.  So:
>        http://example.com/index/sitemap/
> Would actually issue a redirect to:
>        http://example.com/sitemap/
>
>
> However, I will have other controllers, and I want them to use both
> controller and action, so for the indexAction of AdminController:
>        http://example.com/admin/
> And for the loginAction of AdminController:
>        http://example.com/admin/login/
>
> How would this best be accomplished?

Don't hold me responsible for typos, but ...

$router->addRoute('sitemap',
  new Zend_Controller_Router_Route('/sitemap',
    array('controller' => 'index', 'action' => 'sitemap', 'module' =>
'default')));

That should go in your bootstrap, whereever you setup your routes.

Till

Reply via email to