![css](https://habrastorage.org/r/w120/webt/5a/6c/29/5a6c295a5de0d066850531.png)
CSS
1
Вклад в тег
#First rewrite any request to the wrong domain to use the correct one (here www.)
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) http://%{HTTP_HOST}:443/$1 [L,R]
#Now, rewrite to HTTPS:
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]