Experiencing issue with SSL enabling.
I had installed certificate on the server and enabled SSL inside CS-Cart settings, but when I'm trying reach secured version (https://...) it's always redirects me to non-secure (http://...)
I also tried to set redirects inside .htaccess but this created infinite loop of calls http -> https -> http.
After hours of researching I have found that somewhere script calls for local redirect fn and when I disabled everything inside this function - secure version works. This is not coolest way to solve the issue so I decided to create topic here.
Issue appears only on front-end part. Admin subset works good.
CS-Cart version: 3.0.6 (can't update because of custom integrations and theming)
config.local.php
... // Host and directory where software is installed on no-secure server $config['http_host'] = 'www.example.co.uk'; $config['http_path'] = ''; // Host and directory where software is installed on secure server $config['https_host'] = 'www.example.co.uk'; $config['https_path'] = '';...
config.php:
... $config['http_location'] = 'https://' . $config['http_host'] . $config['http_path']; $config['https_location'] = 'https://' . $config['https_host'] . $config['https_path']; $config['current_location'] = (defined('HTTPS')) ? $config['https_location'] : $config['http_location']; ...