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