corrected usage of default redirect code from settings; fixes #546

Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
This commit is contained in:
Michael Kaufmann
2018-04-25 12:27:40 +02:00
parent e58192edc2
commit b3d018c506
4 changed files with 17 additions and 7 deletions

View File

@@ -964,7 +964,7 @@ class apache extends HttpConfigBase
$corrected_docroot = $domain['documentroot'];
// Get domain's redirect code
$code = getDomainRedirectCode($domain['id'], '301');
$code = getDomainRedirectCode($domain['id']);
$modrew_red = '';
if ($code != '') {
$modrew_red = ' [R=' . $code . ';L,NE]';

View File

@@ -467,7 +467,7 @@ class lighttpd extends HttpConfigBase
$uri = $domain['documentroot'];
// Get domain's redirect code
$code = getDomainRedirectCode($domain['id'], '301');
$code = getDomainRedirectCode($domain['id']);
$vhost_content .= ' url.redirect-code = ' . $code. "\n";
$vhost_content .= ' url.redirect = (' . "\n";

View File

@@ -486,7 +486,7 @@ class nginx extends HttpConfigBase
}
// Get domain's redirect code
$code = getDomainRedirectCode($domain['id'], '301');
$code = getDomainRedirectCode($domain['id']);
$vhost_content .= "\t" . 'if ($request_uri !~ ^/.well-known/acme-challenge/\w+$) {' . "\n";
$vhost_content .= "\t\t" . 'return ' . $code .' ' . $uri . '$request_uri;' . "\n";