Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How do I redirect offsite ? 
 
Core
Member
 
Total Posts:  68
Joined:  2008-03-09
 

Hi,

In my payment controller, why doesn’t the following actually redirect offsite?

$this->_redirect('http://www.example.com');

I’ve tried various options like

$this->_redirect('http://www.example.com', array('prependBase' => false));

But to no avail.

What’s happening is that it’s always prepending to the URL no matter what options I pass. I always get pretty much the same result.

i.e.

Forbidden

You don’t have permission to access /site/http:/index/www.example.com/ on this server.

How do I redirect offsite?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Core
Member
 
Total Posts:  68
Joined:  2008-03-09
 

This seemed to work, although I’m not sure sure if it’s the correct thing to do.

In my redirectAction I simply put

...
$response $this->getResponse();
$response->setHeader('Location'$uri);

Once the redirectAction function returns it seems to redirect.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top