Global https and non www not in htaccess
In Home "Service Configuration "Apache Configuration "Include Editor
Under Pre Main Include I select All Versions, which gives me Global input
I added the following which redirects all to https.
I added the following to go from www to non-www, but is does not work.
The net of this is I want all traffic sent to https and non-www for all the domains on the server. Any suggestions, Thanks stapuff106
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
I added the following to go from www to non-www, but is does not work.
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ %{ENV:PROTO}://%1%{REQUEST_URI} [R=301,L]
The net of this is I want all traffic sent to https and non-www for all the domains on the server. Any suggestions, Thanks stapuff106
-
Hello, Can you try removing those rules from the "Pre Main Include" section and use the instructions referenced on the thread linked below instead? SOLVED - HTTPS Redirection For All VirtualHosts Thank you. 0
Please sign in to leave a comment.
Comments
1 comment