Magento secure checkout redirect loop

AndyCollen

Free Member
Jan 18, 2010
18
2
Morning Magento experts,

I have run into a problem with the secure checkout in magento.

I have the site hosted with TSO Host and bought an ssl certificate off them over the weekend. They have installed it for me but when i enable use secure on front end and change the secure base url to https i get a redirect loop error when entering the checkout, if I disable it the checkout works fine although unsecure.

Any help would be greatly appreciated, i'm running out of hair !

Regards,
Andy
 

zigojacko

Free Member
Dec 7, 2009
3,795
1,222
Plymouth, UK
clubnet.digital
First thing to check is the correct admin configuration at System > Configuration > Web...

magssl.png


yourdomain.com should be replaced with the domain that your Magento is installed at.

Use SID on Frontend only needs to be set to 'Yes' if your payment gateway relies on this (such as Sagepay) or any 3rd party extensions.
 
Upvote 0
Okay thanks.

First try adding the following code to the bottom of your Magento root .htaccess file:-

Code:
############################################
## Case sensitivity fix for Magento 1.6.2.0 and newer
SetEnvIf HTTPS On HTTPS=on

Afterwards, please force refresh your site, clear cache (site and browser), browser cookies and /var/sessions/ afterwards. I trust that you have disabled Magento cache for the moment whilst this is being debugged as well?
 
Upvote 0
if you get desperate we are happy to throw up a copy of the site to test on our servers.

Might be worth taking up this offer actually @AndyCollen because the page loading on your site at the moment is so slow, I keep having to look at other projects and keep switching back to this.

Ideally, we need Magento admin access as well. But preferably just SSH out as a tarball and drop on a development server that is tuned to run Magento might be best and @dx3webs is kindly offering this. Will provide a quick way to identify the cause.

I'd strongly recommend investing in some decent website hosting for running Magento and running your store on the Ultimo theme is not going to do you any favours in the slightest either.

Thanks for enabling logging though, I'll check them now.
 
Upvote 0
Okay, this seems to have sorted it...

Modified /lib/Zend/Controller/Request/Http.php.

Code:
public function getScheme()
    {
        //return ($this->getServer('HTTPS') == 'on') ? self::SCHEME_HTTPS : self::SCHEME_HTTP;
    return ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') ? self::SCHEME_HTTPS : self::SCHEME_HTTP;
    }

Actually, HTTP_X_FORWARDED_PROTO isn't correct. It needs to be the server variable that your https is enabled on.

Who is your web host?

I'll revert the changes for a moment...
 
Upvote 0
The problem actually seems to be some sort of useless/funky server side configuration with TSOHost. They might have a load balancer in place that could be affecting this as well.

The site is really slow. The https pages are sporadically returning 500 internal server errors as well. I'm thinking that there are a number of issues going on here, mostly centred around hosting that is not even designed for Magento by the looks of it.

Are you on a dedicated server or shared (most likely judging performance)? Do you know what your php_memory_limit is on the server? This could be why getting lots of 500 errors.

Going to have to abandon this for the moment, I'm afraid.
 
Upvote 0
F

Faevilangel

IMHO tsohost are awesome for small sites (html, wordpress etc) but throw in Magento and they do tend to fall over as they aren't optimised for it and Magento is a beast which needs a lot more than shared hosting from TSO can offer, using someone like DX3 will be much better in the long run.
 
  • Like
Reactions: zigojacko
Upvote 0

zigojacko

Free Member
Dec 7, 2009
3,795
1,222
Plymouth, UK
clubnet.digital
Just a quick update.

Andy from @dx3webs installed the site on his test server and everything works fine with a significant boost in page load times, so the problem has been with Tsohost's configuration.

Thanks for all the help in getting to the bottom of this.

Aye, thought as much. Good work @dx3webs :)

Glad that's sorted...
 
Upvote 0

Latest Articles