also add logfiles to virtual-host if it's a redirect
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -823,6 +823,7 @@ class Apache extends HttpConfigBase
|
||||
$modrew_red = ' [R=' . $code . ';L,NE]';
|
||||
}
|
||||
|
||||
$vhost_content .= $this->getLogfiles($domain);
|
||||
// redirect everything, not only root-directory, #541
|
||||
$vhost_content .= ' <IfModule mod_rewrite.c>' . "\n";
|
||||
$vhost_content .= ' RewriteEngine On' . "\n";
|
||||
|
||||
@@ -406,6 +406,7 @@ class Lighttpd extends HttpConfigBase
|
||||
// Get domain's redirect code
|
||||
$code = Domain::getDomainRedirectCode($domain['id']);
|
||||
|
||||
$vhost_content .= $this->getLogFiles($domain);
|
||||
$vhost_content .= ' url.redirect-code = ' . $code . "\n";
|
||||
$vhost_content .= ' url.redirect = (' . "\n";
|
||||
$vhost_content .= ' "^/(.*)$" => "' . $uri . '$1"' . "\n";
|
||||
|
||||
@@ -604,6 +604,7 @@ class Nginx extends HttpConfigBase
|
||||
// Get domain's redirect code
|
||||
$code = Domain::getDomainRedirectCode($domain['id']);
|
||||
|
||||
$vhost_content .= $this->getLogFiles($domain);
|
||||
$vhost_content .= "\t" . 'location / {' . "\n";
|
||||
$vhost_content .= "\t\t" . 'return ' . $code . ' ' . $uri . '$request_uri;' . "\n";
|
||||
$vhost_content .= "\t" . '}' . "\n";
|
||||
|
||||
Reference in New Issue
Block a user