Skip to content

Instantly share code, notes, and snippets.

@avoidik
Last active March 4, 2018 11:00
Show Gist options
  • Select an option

  • Save avoidik/6d138d76ef158709dd144a292e0e4832 to your computer and use it in GitHub Desktop.

Select an option

Save avoidik/6d138d76ef158709dd144a292e0e4832 to your computer and use it in GitHub Desktop.
AWS proper HTTPS offloading with health-check
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]
@avoidik

avoidik commented Mar 4, 2018

Copy link
Copy Markdown
Author

Line 4 might be removed for sites in sub-folders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment