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