Magento Controllers: Redirecting to External URLs

Just a quick one. If you need to redirect to a URL outside of your regular Magento Base then its no use using:

$this->_redirect($path)

..instead use:

$this->_redirectUrl($url)

The only time to use the _redirect variant would be to redirect to an internal module/controller/action/param1/param1value page, where as _redirectUrl is geared towards your external URLs.

Back to work!

Posted by Nick.

About Nick: As embarrassing as it may be, he gets irrationally excited about new projects and technologies. Refuses to wear shoes in the office. Technical Director at Meanbee.

View the original version of this post.

Leave a Reply

  • You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tweets from @meanbee

Contact Meanbee

Send us your message