View Single Post
  #2  
Old 9th September 2010, 21:17
radim_h radim_h is offline
Senior Member
 
Join Date: Jan 2007
Location: Prague, Czech
Posts: 419
Thanks: 33
Thanked 24 Times in 19 Posts
Send a message via ICQ to radim_h
Default

Here is modification from my friend QUIP

Replace:
Code:
foreach($server_alias as $tmp_alias) {
   if($n % 30 == 0) $server_alias_str .= "\n    ServerAlias ";
   $server_alias_str .= $tmp_alias;
}
with
Code:
foreach($server_alias as $tmp_alias) {
    if($n % 30 == 0) $server_alias_str .= "\n    ServerAlias ";
    $daliases = explode(" ", trim($tmp_alias));
    foreach($daliases as $dalias) {
        if (trim($dalias) != "") {
            $wild_dalias = preg_replace('/^www\./', '*.', trim($dalias)) . '.' . trim($conf['serverconfig']['server']['hostname']);
            $short_dalias = preg_replace('/^www\./', '', trim($dalias)) . '.' . trim($conf['serverconfig']['server']['hostname']);
            $server_alias_str .=  trim($dalias) . " " . $wild_dalias . " " . $short_dalias . " ";
       }
    }
}
Then every domain will have bit different type of preview:

domain.tld
will have aliases
domain.tld.servername.serverdomain.tld, *domain.tld.servername.serverdomain.tld

but only when in
Web Sites=>Domain =>Auto-Subdomain "www." or "*." is chosen
it will not work with None

Last edited by radim_h; 10th September 2010 at 15:21.
Reply With Quote