RewriteCond %{HTTPS} !on RewriteRule (.*) https://example.com/$1 [R,L]