SSL Redirect Loop Issue

I cannot enable the only payment gateway we want to use, due to a redirect loop.

The SSL certificate is installed, and is working.

I am using Media Temple for hosting, but have specified to them to use my SSL so there is a specific IP for the site.

I’m totally stuck until I can fix this issue.

is the directory where the install is. The SSL cert was purchased for the domain, and worked on subfolders with a different cart I tried.


I just had this problem. Turns out my host had associated my SSL certificate with their SSL proxy instead of my site’s IP.

Not sure if that helps, but I figured I’d throw it out there since I already spent a lot of time with both CS-Cart support and my host before we figured out the problem.

Hi I’m from (mt) Media Temple technical support, the issue that frank551 is reporting is due to how we handle SSL connections on the (gs) Grid-Service. Our HTTP_HOST over SSL would be defined as rather than just

The good news is that there is a very easy fix for this:

  1. FTP into your server

  2. Locate the file ‘prepare.php’ (generally located in /home/####/domains/

  3. Download the file, make a backup

  4. Edit the file using a plaintext text editor such as notepad

  5. Replace the following line:

    define(‘REAL_HOST’, $_SERVER[‘HTTP_HOST’]);


    define(‘REAL_HOST’, $_SERVER[‘SERVER_NAME’]);

  6. Re-upload and overwrite prepare.php

  7. Fixed!

    Hope this helps.