From 9373d6d163138f996b3ee13a558cdbb3eafbc58a Mon Sep 17 00:00:00 2001 From: Lukasz Szczedzina Date: Tue, 28 May 2024 16:16:09 +0200 Subject: [PATCH] fix for redirecting to http homepage first instead of https --- dispatcher/src/conf.d/rewrites/rewrite.rules | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dispatcher/src/conf.d/rewrites/rewrite.rules b/dispatcher/src/conf.d/rewrites/rewrite.rules index 2724bc3ee6..16af0b8019 100644 --- a/dispatcher/src/conf.d/rewrites/rewrite.rules +++ b/dispatcher/src/conf.d/rewrites/rewrite.rules @@ -16,8 +16,12 @@ RewriteRule ^(.*)$ https://wknd.site%{REQUEST_URI} [R=301,L,E=cdncache] # redirect all root traffic to US home page RewriteCond %{REQUEST_URI} ^/?$ +RewriteCond %{HTTP:X-Forwarded-Proto} ^$ RewriteRule ^(/)$ /us/en.html [R=301,L,E=cdncache] +RewriteCond %{REQUEST_URI} ^/?$ +RewriteRule ^(/)$ %{HTTP:X-Forwarded-Proto}://%{HTTP_HOST}/us/en.html [R=301,L,E=cdncache] + RewriteCond %{REQUEST_URI} !^/apps RewriteCond %{REQUEST_URI} !^/bin RewriteCond %{REQUEST_URI} !^/content