Skip to content

Instantly share code, notes, and snippets.

@aindong
Created September 14, 2016 07:37
Show Gist options
  • Save aindong/328c984c732cea3db6fbc01cff5997f6 to your computer and use it in GitHub Desktop.
Save aindong/328c984c732cea3db6fbc01cff5997f6 to your computer and use it in GitHub Desktop.
Redirect http to https using aws load balancer and .htaccess
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment