Rewrite to https://www
Place in .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Rewrite non-www to www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
# Rewrite http to https
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>