RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [L]