Last active
March 4, 2018 11:00
-
-
Save avoidik/6d138d76ef158709dd144a292e0e4832 to your computer and use it in GitHub Desktop.
AWS proper HTTPS offloading with health-check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteEngine On | |
| RewriteCond %{HTTPS} off | |
| RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
| RewriteCond %{HTTP_USER_AGENT} !^ELB-HealthChecker | |
| RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 4 might be removed for sites in sub-folders