RSS - Latest posts Redirect in controller plugin - Zend Framework 1.8

Home » 2009 » 07 » Redirect in controller plugin - Zend Framework 1.8

If you need to redirect while inside a controller plugin, for example in preDispatch() here is a quick way to do it:

$redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
$redirector->gotoUrl('/login/');

 

You can leave a response, or trackback from your own site.

Add Comment

  1. 10th October 2009
    at 7:51 am

    Exactly what I was looking for. Cheers!