HTTP and HTTPS versions showing up
Hi,
I have two versions of artmarkers.com.au showing up. One is secure one is not.
https://www.artmarkers.com.au/
http://www.artmarkers.com.au/
Any ideas? The hosts did transfer the site to a different server a while back but they're saying it's my configuration.
Help appreciated.
Re: HTTP and HTTPS versions showing up
When you forcible go to the non https site
Quote:
Originally Posted by
bardicle
You will see that all the links are still secure
and any click takes to the secure site
You are only seeing the insecure url by directly typing in the non secure url
If you want it to redirect directly to the secure site you will need to use a .htaccess directive
Re: HTTP and HTTPS versions showing up
You might want to first check your includes/configure.php to see if it matches
Code:
<?php/**
* @package Configuration Settings
* @copyright Copyright 2003-2016 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* File Built by Zen Cart Installer on Mon Jan 01 2018 06:36:11
*/
/*************** NOTE: This file is VERY similar to, but DIFFERENT from the "admin" version of configure.php. ***********/
/*************** The 2 files should be kept separate and not used to overwrite each other. ***********/
/**
* Enter the domain for your store
* HTTP_SERVER is your Main webserver: eg-http://www.yourdomain.com
* HTTPS_SERVER is your Secure/SSL webserver: eg-https://www.yourdomain.com
*/
define('HTTP_SERVER', 'https://www.artmakers.com.au');
define('HTTPS_SERVER', 'https://www.artmakers.com.au');
/**
* If you want to tell Zen Cart to use your HTTPS URL on sensitive pages like login and checkout, set this to 'true'. Otherwise 'false'. (Keep the quotes)
*/
define('ENABLE_SSL', 'true');
If that is correct, then you'll use the .htaccess IF you don't have a conflicting setting in cPanel.
Re: HTTP and HTTPS versions showing up
Thank you both for your time and expertise.
I borrowed some code and added it to .htaccess. It worked.
Thanks again. Here it is -
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don’t put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]