This question already has an answer here:

I am using a custom reviews form. After submiting the form I want the user to be directed to a new page saying thank you. Currently it is being redirected by the indexcontroller.php with:


How would I get it to redirect to a cms page?

marked as duplicate by Amit Bera, Siarhey Uchukhlebau, liyakat, Keyul Shah, Manthan Dave Jul 31 '17 at 5:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

        /* Redirect to certain url  */

if you want to redirect on any page:


For more information follow the blow url: http://blog.chapagain.com.np/magento-redirect-functions/


Add a new function in your custom controller:

public function customAction() {
    $block = $this->getLayout()->createBlock('core/template')->setTemplate('path/to/custom.phtml');

Then update $this->_redirectReferer(); to $this->_redirect('*/*/custom');

Create your custom page in : app/design/frontend/{package}/{theme}/template/path/to/custom.phtml


You can do this by using below code.

$url = Mage::getUrl('thank-you'); --> CMS page url key


Not the answer you're looking for? Browse other questions tagged or ask your own question.