respect ssl_redirect setting for domains, fixes #542
This commit is contained in:
@@ -391,6 +391,14 @@ class nginx
|
||||
|
||||
$vhost_content.= $this->getServerNames($domain);
|
||||
|
||||
// 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.= "\t".'rewrite ^(.*) '.$this->idnaConvert->encode($domain['documentroot']).'$1 permanent;'."\n";
|
||||
|
||||
Reference in New Issue
Block a user