RewriteCond %{HTTPS} off [OR]RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]
Source: Forcing SSL and WWW using .htaccess – Stack Overflow
RewriteCond %{HTTPS} off [OR]RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]
Source: Forcing SSL and WWW using .htaccess – Stack Overflow