Already turned on 'Force HTTPS redirect' under 'Domains' but one addon domain (static site) is not redirecting
Hello lovely boys and girls, I'd appreciate some help with this little bump I'm having.
I use WordPress for all my primary and addon domains, except for one of my sites, which is a static html + css + js site.
In cPanel I went to 'Domains' and turned on 'Force HTTPS Redirect' for my primary domain.
All my WordPress addon domains correctly inherit the HTTPS status from my primary domain.
However, the addon domain that has the static site is not redirecting to HTTPS.
Upon checking the htaccess for that site, this is the code that appears:
It should therefore work, but it isn't. I have a feeling that to solve the problem I have to manually edit or include something in my static site's index.html or css files but I don't really know what to do. Please help and thank you in advance.
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
Header always set Content-Security-Policy "upgrade-insecure-requests;"It should therefore work, but it isn't. I have a feeling that to solve the problem I have to manually edit or include something in my static site's index.html or css files but I don't really know what to do. Please help and thank you in advance.
-
Hello, Can you run the following from a CLI that is not associated with the server: curl -vv http://youraddondomainname.tld
And paste the output in a response here, just ensure you remove any actual domain names or IP addresses0 -
Hello, thank you for your reply. I am unable to do that/don't have the ability or knowledge to. Is there anything else I can look at to solve this as a beginner? 0 -
There are sites out there like this one Run Curl Commands Online that will let you copy-paste your request in and provide you output. If you do use this one, please provide the Raw output in response. If you're uncomfortable doing this I'd suggest you contact your hosting provider for assistance. 0 -
Thank you. I will contact my host. 0
Please sign in to leave a comment.
Comments
4 comments