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.
Next Article
Previous Article
Add Comment
2
Comments

Exactly what I was looking for. Cheers!
Not sure what’s going on exactly. I’m trying to use that, but it doesn’t redirect. It only continues to execute the current request.