Change redirect host from main domain name to requested domain name
This commit is contained in:
@@ -808,7 +808,7 @@ class apache extends HttpConfigBase
|
|||||||
$_sslport = ":" . $ssldestport['port'];
|
$_sslport = ":" . $ssldestport['port'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$domain['documentroot'] = 'https://' . $domain['domain'] . $_sslport . '/';
|
$domain['documentroot'] = 'https://%{HTTP_HOST}' . $_sslport . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ssl_vhost === true && $domain['ssl'] == '1' && Settings::Get('system.use_ssl') == '1') {
|
if ($ssl_vhost === true && $domain['ssl'] == '1' && Settings::Get('system.use_ssl') == '1') {
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ class lighttpd extends HttpConfigBase
|
|||||||
$_sslport = ":" . $ssldestport['port'];
|
$_sslport = ":" . $ssldestport['port'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$domain['documentroot'] = 'https://' . $domain['domain'] . $_sslport . '/';
|
$domain['documentroot'] = 'https://%1' . $_sslport . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
// avoid using any whitespaces
|
// avoid using any whitespaces
|
||||||
@@ -435,11 +435,13 @@ class lighttpd extends HttpConfigBase
|
|||||||
|
|
||||||
// Get domain's redirect code
|
// Get domain's redirect code
|
||||||
$code = getDomainRedirectCode($domain['id'], '301');
|
$code = getDomainRedirectCode($domain['id'], '301');
|
||||||
|
|
||||||
$vhost_content .= ' url.redirect-code = ' . $code. "\n";
|
$vhost_content .= ' $HTTP["host"] =~ "^(.*)$" {'. "\n";
|
||||||
$vhost_content .= ' url.redirect = (' . "\n";
|
$vhost_content .= ' url.redirect-code = ' . $code. "\n";
|
||||||
$vhost_content .= ' "^/(.*)$" => "' . $uri . '$1"' . "\n";
|
$vhost_content .= ' url.redirect = (' . "\n";
|
||||||
$vhost_content .= ' )' . "\n";
|
$vhost_content .= ' "^/(.*)$" => "' . $uri . '$1"' . "\n";
|
||||||
|
$vhost_content .= ' )' . "\n";
|
||||||
|
$vhost_content .= ' }' . "\n";
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true, true);
|
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true, true);
|
||||||
|
|||||||
@@ -447,7 +447,7 @@ class nginx extends HttpConfigBase
|
|||||||
$_sslport = ":" . $ssldestport['port'];
|
$_sslport = ":" . $ssldestport['port'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$domain['documentroot'] = 'https://' . $domain['domain'] . $_sslport . '/';
|
$domain['documentroot'] = 'https://$host' . $_sslport . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
// avoid using any whitespaces
|
// avoid using any whitespaces
|
||||||
|
|||||||
Reference in New Issue
Block a user