From 0d07ae51cb19ac6190c4784f2b506e8250c08a41 Mon Sep 17 00:00:00 2001 From: lookshe Date: Thu, 10 Nov 2016 23:31:27 +0100 Subject: correct subdomains for alias domains --- src/server/plugins-available/apache2_plugin.inc.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/server/plugins-available/apache2_plugin.inc.php b/src/server/plugins-available/apache2_plugin.inc.php index d5aabe2..16ba38e 100755 --- a/src/server/plugins-available/apache2_plugin.inc.php +++ b/src/server/plugins-available/apache2_plugin.inc.php @@ -1000,12 +1000,8 @@ class apache2_plugin { if(is_array($aliasdomains)) { foreach($aliasdomains as $aliasdomain) { $temp_domains[] = $aliasdomain['domain']; - if(isset($aliasdomain['subdomain']) && ! empty($aliasdomain['subdomain'])) { - $temp_domains[] = $aliasdomain['subdomain'] . "." . $aliasdomain['domain']; - } - - foreach($sub_prefixes as $s) { - $temp_domains[] = $s . $aliasdomain['domain']; + if(isset($aliasdomain['subdomain']) && substr($aliasdomain['domain'],0,4) != 'www.' && ($aliasdomain['subdomain'] == "www" OR $aliasdomain['subdomain'] == "*")) { + $temp_domains[] = "www." . $aliasdomain['domain']; } } } -- cgit v1.2.3