How to switch to https?

Redirects all pages on the main something in the transition

use:
RewriteCond %{HTTP:SSL} !=1 [NC]
RewriteRule ^(.*) https://домен/$1 [L,R=301]

89c638c654b946a094bf97f5452745e8.png
July 9th 19 at 13:21
4 answers
July 9th 19 at 13:23
RewriteEngine On
RewriteBase /

RewriteCond %{SERVER_PORT} !^443
RewriteRule (.*) https://example.com/$1 [R=301,L]
July 9th 19 at 13:25
And if so:
RewriteEngine On
RewriteCond %{SERVER_PORT} ^80$ [OR]
RewriteCond %{HTTP} =on
RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]
July 9th 19 at 13:27
RewriteCond %{HTTPS} =on
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
July 9th 19 at 13:29
<ifmodule mod_rewrite.c>
 RewriteEngine on 
 RewriteCond %{HTTPS} !on [NC]
 RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R]
</ifmodule>

Find more questions by tags HTTPSSearch engine optimization