Skip to content

Instantly share code, notes, and snippets.

@mustardBees
Created February 25, 2020 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mustardBees/2d4ca685d2e4c38a3a77c976a6c7100c to your computer and use it in GitHub Desktop.
Save mustardBees/2d4ca685d2e4c38a3a77c976a6c7100c to your computer and use it in GitHub Desktop.
Force HTTPS
# BEGIN Force HTTPS
RewriteCond %{HTTP:X-Forwarded-Proto} !=https
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_METHOD} !=POST
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# END Force HTTPS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment