RewriteEngine On RewriteCond %{HTTPS} !^on$ RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [L,R]