Post by Rainforest » Sat Nov 11, 2017 8:20 pm

So, I'm doing some maintenance on my sites and am going crazy trying to figure this out.
Google and a redirect mapper are saying I Have 2 redirects

http://non-www to https://non-www
http://www. to https://www


My oc 2.3.0.2 site which runs full SSL and the preferred version is www.
It also runs behind a firewall with HSTS enabled

In my htaccess I have this:

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?(.*)$ [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

my config.php files all list
https://www.mysite.com/whatever-link

I can't figure out what's going on to get rid of that speedtest warning

Active Member

Posts

Joined
Fri Jan 28, 2011 3:50 am

Post by IP_CAM » Sun Nov 12, 2017 6:26 am

Well, you could try this .htaccess rewrite Function instead of yours,
it's probably this, what's creating the problem:

Code: Select all

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?(.*)$ [NC]
Ernie

Code: Select all

#Force (http host) non www to www (optional)
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTPS_HOST}/$1 [R=301,L]

#Force (https host) non www to www (optional)
RewriteCond %{HTTPS} on
RewriteCond %{HTTPS_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTPS_HOST}/$1 [R=301,L]

Ernie's OpenCart v.1.5.6.5 LIGHT + OpenShop Admin v.1.75 Test Sites
http://www.ebikes.li - http://www.evelo.li - http://www.openshop.li
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Rainforest » Tue Nov 14, 2017 6:14 am

Thank you, Earnie.
Unfortunately, that didn't work.
I ended up breaking my site.
Just got a blank screen.
In the address bar was

https://www./

Active Member

Posts

Joined
Fri Jan 28, 2011 3:50 am
Who is online

Users browsing this forum: No registered users and 2 guests