Tag Archives: referer

Redirect with Zend Framework

Once I wrote about redirecting with Zend Framework, but what I missed back than was a common mistake. Although the code from my post is working, to be completely correct after redirecting I’d to add an exit() statement.

This is important because the header is changed and if something goes after the redirect there will be some problems. Finally the correct snippet is:

public function() {
	$this->_redirect('some_url');
	exit();	
}