301 Redirect and HSTS in .htaccess
I've changed a site to https and have set up a redirect in .htaccess. But I've also set Strict Transport Security. Are both necessary or useful? <IfModule mod_headers.c> Header always set Strict-Transport-Security "max-age=16070400" </IfModule> <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] </IfModule> Cheers A redirect tells people who enter http://www.example.com to go to https://www.example.com . Since the default is http, if you leave off the protocol and just type www.example.com then you will go to http://www