respect ssl_redirect setting for domains, fixes #542

This commit is contained in:
Michael Kaufmann (d00p)
2011-01-09 16:25:32 +00:00
parent bffa8817d9
commit cc4637095d
3 changed files with 19 additions and 5 deletions

View File

@@ -441,7 +441,15 @@ class lighttpd
$vhost_content = '';
$vhost_content.= $this->getServerNames($domain) . " {\n";
// respect ssl_redirect settings, #542
if($ssl_vhost == false
&& $domain['ssl'] == '1'
&& $domain['ssl_redirect'] == '1'
) {
$domain['documentroot'] = 'https://' . $domain['domain'] . '/';
}
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
{
$vhost_content.= ' url.redirect = (' . "\n";