Magento redirect from phtml or model or helper or block or observer : Mage::app()->getResponse()->setRedirect() is used for redirecting from phtml in magento.
Note : $this->_redirect(”); is used in controller , it will not work in phtml.
Magento redirect from phtml or model or helper or block or observer Example
Example :
Mage::app()->getResponse()->setRedirect('checkout/onepage');
or
Mage::app()->getResponse()->setRedirect('checkout/onepage'); exit;