Skip to content

Instantly share code, notes, and snippets.

@annevk
Created September 14, 2014 17:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save annevk/3ec0c4cc129059eb567d to your computer and use it in GitHub Desktop.
Save annevk/3ec0c4cc129059eb567d to your computer and use it in GitHub Desktop.
Header set Strict-Transport-Security "max-age=31415926; includeSubDomains" env=HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
@annevk
Copy link
Author

annevk commented Sep 16, 2014

https://annevankesteren.nl/2014/09/tls-hsts has rationale and some other techniques.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment