Skip to content

Instantly share code, notes, and snippets.

@rederlo
Created July 7, 2017 20:33
Show Gist options
  • Save rederlo/6bf57b07b0b257b7cb516ca41eafe6d9 to your computer and use it in GitHub Desktop.
Save rederlo/6bf57b07b0b257b7cb516ca41eafe6d9 to your computer and use it in GitHub Desktop.
AWS redirect http to https
# the final correct redirect
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} ^http$
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