From f0cc342e06de24c72ec451105ea00dece0519c8f Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Tue, 15 Sep 2020 10:30:08 +0200
Subject: [PATCH] Only disable HTTPS redirect when SSL is turned off (#4325)

---
 server/plugins-available/apache2_plugin.inc.php | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 82c17a9b10..f6403b7969 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -1492,9 +1492,7 @@ class apache2_plugin {
 		}
 
 		if($data['new']['ssl'] == 'n') {
-			$tpl->setVar('rewrite_enabled', 0);
-		} else {
-			$tpl->setVar('rewrite_enabled', 1);
+			$tpl->setVar('rewrite_to_https', 'n');
 		}
 
 		//$tpl->setLoop('redirects',$rewrite_rules);
-- 
GitLab