RewriteEngine On RewriteCond %{HTTPS} !=on RewriteCond %{ENV:HTTPS} !=on RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
Apache selber empfiehlt redirect statt mod_rewrite:
<If "%{SERVER_PROTOCOL} != 'HTTPS'">
Redirect "/" "https://%{HTTP_HOST}/"
</If>