diff options
author | lookshe <github@lookshe.org> | 2016-11-10 23:31:27 +0100 |
---|---|---|
committer | lookshe <github@lookshe.org> | 2016-11-10 23:31:27 +0100 |
commit | 0d07ae51cb19ac6190c4784f2b506e8250c08a41 (patch) | |
tree | c071eaa1e9beb55fa139fd78c96c339fdcc5acca | |
parent | 89de2905d2282b710c491314f2cb4e06d0d8f3bd (diff) |
correct subdomains for alias domains
-rwxr-xr-x | src/server/plugins-available/apache2_plugin.inc.php | 8 |
1 files 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']; } } } |