Это будет работать как для https, так и для www
RewriteCond %{HTTPS} !=on # This checks to make sure the connection is not already HTTPS RewriteRule ^/?(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]