diff --git a/scripts/jobs/cron_tasks.inc.http.10.apache.php b/scripts/jobs/cron_tasks.inc.http.10.apache.php index 1ce6cdfa..13df99f1 100644 --- a/scripts/jobs/cron_tasks.inc.http.10.apache.php +++ b/scripts/jobs/cron_tasks.inc.http.10.apache.php @@ -757,6 +757,14 @@ class apache if(preg_match('/^https?\:\/\//', $domain['documentroot'])) { + // redirect everything, not only root-directory, #541 + + $vhost_content.= ' '."\n"; + $vhost_content.= ' RewriteEngine On' . "\n"; + $vhost_content.= ' RewriteCond %{HTTPS} off' . "\n"; + $vhost_content.= ' RewriteRule (.*) '. $this->idnaConvert->encode($domain['documentroot']).'%{REQUEST_URI}'. "\n"; + $vhost_content.= ' ' . "\n"; + $code = getDomainRedirectCode($domain['id']); $vhost_content.= ' Redirect '.$code.' / ' . $this->idnaConvert->encode($domain['documentroot']) . "\n"; }