If the domain is called without SSL (i.e. “https: //”) or no “www.” before that, the forwarding takes place to an SSL domain with WWW.

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^(.*)$  [NC]
RewriteRule (.*) https://www.%1/$1 [R=302,L]

Leave a Reply

Your email address will not be published. Required fields are marked *