Using redirection in Magento controllers is not a rocket science thanks to Mage_Core_Controller_Varien_Action::_redirect() and Mage_Core_Controller_Varien_Action::_redirectUrl() methods. When trying to create redirection in CMS page (to prevent not logged-in users from accessing it) I found follwing code very helpful:
The setRedirect() method accept two parameters – target URL and redirect code (302 by default).
No comments:
Post a Comment