Answer the question
In order to leave comments, you need to log in
How to switch to https?
Redirects all pages to the main page of something when going
using:
RewriteCond %{HTTP:SSL} !=1 [NC]
RewriteRule ^(.*) https://domain/$1 [L,R=301]
Answer the question
In order to leave comments, you need to log in
RewriteEngine On
RewriteBase /
RewriteCond %{SERVER_PORT} !^443
RewriteRule (.*) https://example.com/$1 [R=301,L]
And if so:
RewriteEngine On
RewriteCond %{SERVER_PORT} ^80$ [OR]
RewriteCond %{HTTP} =on
RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]
RewriteCond %{HTTPS} =on
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question