From 973200d40c8499d55382def720de15d6524038ca Mon Sep 17 00:00:00 2001 From: Nam Dau Date: Wed, 30 Sep 2015 11:40:33 +0800 Subject: [PATCH] Added redirect flag to force HTTPS when server is behind a reverse proxy --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 56e83bd..461c0d5 100644 --- a/README.md +++ b/README.md @@ -104,8 +104,8 @@ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} ### Force HTTPS Behind a Proxy Useful if you have a proxy in front of your server performing TLS termination. ``` apacheconf -RewriteCond %{HTTP:X-Forwarded-Proto} !https -RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} +RewriteCond %{HTTP:X-Forwarded-SSL} !on +RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] ``` ### Force Trailing Slash