Skip to content

Instantly share code, notes, and snippets.

@williamli
Created September 3, 2013 11:12
Show Gist options
  • Save williamli/6422531 to your computer and use it in GitHub Desktop.
Save williamli/6422531 to your computer and use it in GitHub Desktop.
HTTPS Enforcer for Apache .htaccess in 3 Lines
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment