I implemented a Form with a submission treatment by controller.

At the end of the treatment, I would like to redirect to the form submission page.

I tried several things :




I also tried to place the form submission url in the form by adding :

<input name="redirect_url" type="hidden" value="<?php echo $this->helper('core/url')->getCurrentUrl() ?>" />

and in the controller :

$post = $this->getRequest()->getPost();

But none of these solutions are working… Any help please?

1 Answer 1


Good guide with some options here. I normally use $this->_redirectUrl($url);

  • thank you for your answer. But It is not working for me… I tried : $this->_redirectUrl('http://www.etoto.fr/sales/order/view/order_id/139/'); and Mage::app()->getFrontController()->getResponse()->setRedirect('http://www.etoto.fr/sales/order/view/order_id/139'); ?
    – Alexglvr
    Aug 5, 2014 at 6:22
  • I think something might be wrong in your controller. Can you post the code?
    – mbalparda
    Aug 5, 2014 at 6:48
  • I had an uncommented "echo" in my code, inducing a "Cannot send headers" error… working fine! thanks again.
    – Alexglvr
    Aug 5, 2014 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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