<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP:X-Proto} !SSL RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L] </IfModule>