Hi all....
I've tried several .htaccess changes to try and get this to work but failed.
I have one Magento 1.9.4.1 installation with three different websites.
One of the sites uses an SSL Certificate and I want this site to use https on ALL pages.
The code on my index.php uses the following for each site:
switch($_SERVER['HTTP_HOST']) { case 'website2.co.uk': case 'www.website2.co.uk': Mage::run('website2', 'website'); break; default: Mage::run('base', 'website'); break; default: Mage::run(); break; case 'website3.co.uk': case 'www.website3.co.uk': Mage::run('website3', 'website'); break; default: Mage::run(); break;
The default website being the one I want to use https on.
I manage my stores as seen in my screenshot attached.
If I change the default website unsecure url to https, all internal links go to the homepage.
Can anyone suggest the correct code for the .htaccess so that all internal and external (http) links use the https correctly please?
Many thanks in advance.
Andy
Solved! Go to Solution.
Hello @Andy_Acute
remove all thing whatever you did into access
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
and then change all nonsecure and secure into the admin with https
if works then mark as solution
Hello @Andy_Acute
remove all thing whatever you did into access
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
and then change all nonsecure and secure into the admin with https
if works then mark as solution
Hi Sunil
Thank you for your response.
I managed to get it working by using the below.
This worked for my particular setup.
Thanks again..
RewriteEngine on
RewriteCond %{HTTP_HOST} ^websitename\.co.uk [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.websitename.co.uk/$1 [R,L]
Hello @Andy_Acute
I glad my solution work.
Can you please accept as solution.
Thanks