From a4973c9c385ff0e0064f0314fc5923da6cbeb007 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Wed, 21 Jan 2015 16:51:36 +0100 Subject: [PATCH] don't add rewritecond for https off if this is a ssl-vhost Signed-off-by: Michael Kaufmann (d00p) --- scripts/jobs/cron_tasks.inc.http.10.apache.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/jobs/cron_tasks.inc.http.10.apache.php b/scripts/jobs/cron_tasks.inc.http.10.apache.php index 6223741d..73d9f520 100644 --- a/scripts/jobs/cron_tasks.inc.http.10.apache.php +++ b/scripts/jobs/cron_tasks.inc.http.10.apache.php @@ -764,7 +764,9 @@ class apache { // redirect everything, not only root-directory, #541 $vhost_content .= ' '."\n"; $vhost_content .= ' RewriteEngine On' . "\n"; - $vhost_content .= ' RewriteCond %{HTTPS} off' . "\n"; + if (!$ssl_vhost) { + $vhost_content .= ' RewriteCond %{HTTPS} off' . "\n"; + } $vhost_content .= ' RewriteRule ^/(.*) '. $corrected_docroot.'$1 ' . $modrew_red . "\n"; $vhost_content .= ' ' . "\n";