Redirect in Zend Framework

April 27th, 2011 by usage | Filed under PHP, Programming

How to do a redirect in Zend Framework

Option 1

$goToUrl = 'http://yahoo.com';
$goToUrl$redirector = new Zend_Controller_Action_Helper_Redirector();
$redirector->gotoUrl($goToUrl);

Option 2

$goToUrl = 'http://yahoo.com';
$this->_redirect($goToUrl); // in controllers' methods

tag_icon

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a comment.

To leave a comment, please fill in the fields below.