Skip to content

Instantly share code, notes, and snippets.

@lemonlab
Created September 11, 2015 12:40
Show Gist options
  • Save lemonlab/b59b6708642a27fb0a2b to your computer and use it in GitHub Desktop.
Save lemonlab/b59b6708642a27fb0a2b to your computer and use it in GitHub Desktop.
htaccess : SSL Only
# Force SSL (https) except on localhost
RewriteCond %{HTTPS} !=on
RewriteCond %{REMOTE_ADDR} !=::1
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