Skip to content

Instantly share code, notes, and snippets.

@1nsp1r3rnzt
Created December 1, 2017 05:40
Show Gist options
  • Save 1nsp1r3rnzt/fc44459e2954e3b1cd135ab79fd15cbe to your computer and use it in GitHub Desktop.
Save 1nsp1r3rnzt/fc44459e2954e3b1cd135ab79fd15cbe to your computer and use it in GitHub Desktop.
# Redirect HTTP to HTTPS
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?codehealthy.com$
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment