Skip to content

Instantly share code, notes, and snippets.

@betawax
Created February 3, 2015 14:37
Show Gist options
  • Save betawax/464028a57a899a49cada to your computer and use it in GitHub Desktop.
Save betawax/464028a57a899a49cada to your computer and use it in GitHub Desktop.
Redirect non SSL requests via mod_rewrite
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment