Configure OpenCart to work with Cloudflare and SSL

 No Comments
#CrapCoding
The free account with CloudFlare does not support SSL. However, this does not mean you cannot use a free Cloudflare account with your SSL certificate. More information about this can be found in our tutorial here:

Does CloudFlare support SSL?

This is very first and the good step to take backup. Before performing the following procedure, it is a good idea to make a backup of your account prior to making any changes.
As you may or may not know, Cloudflare works via a CNAME record for www. This means that www.yourdomain.com is redirected to Cloudflare’s servers, but yourdomain.com (without www) is not.

Modify this code

// HTTP
define('HTTP_SERVER', 'http://www.yourdomain.com/');
define('HTTP_IMAGE', 'http://www.yourdomain.com/image/');
define('HTTP_ADMIN', 'https://yourdomain.com/admin/');

// HTTPS
define('HTTPS_SERVER', 'https://yourdomain.com/');
define('HTTPS_IMAGE', 'https://yourdomain.com/image/');

Leave a Reply