How to Redirect URL in Magento?

When the redirect goes into effect, any existing links that point to the previous URL are seamlessly redirected to the new address.Sometimes, you can create a new action in the controller, set phtml file as template for that new action, and redirect from your action to new action.The redirect functions are present in

* Redirect to certain url  */

/* Redirect to certain path */
_redirect($path, $arguments=array())

/* Redirect to success page */

/* Redirect to error page */

/* Set referer url for redirect in response */

_redirect() function make a "simple" redirect to the provided URL.

// $this->_redirect('module/controller/action');

_redirectUrl() function which helps to redirect our action to external URL outside Magento base.

// or

Also,you can use below mentioned code


// or

If you face any problems or need our professional services, please email us at [email protected]

Join our Newsletter

Never miss the latest offers, voucher codes and useful articles delivered weekly in your inbox.