View Single Post
  #4  
Old 10th December 2010, 19:55
omig omig is offline
Junior Member
 
Join Date: Dec 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default temporary/test URL for any subdomain setting

Here is my solution, it works for any subdomain setting. I suggest adding this feature to svn.

Find in the /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php script:
Code:
>$tpl->setVar('alias','');
>	}
after that, add:
Code:
//* Add "temporary URL" Server alias like exampletld.server.mydomain.com
$vhost_domain = $tpl->getVar('domain');
$new_site_temporary_url = "\n    ServerAlias " . preg_replace("/\./","",$vhost_domain) . '.' . trim($conf['serverconfig']['server']['hostname']);
$server_alias_str = $tpl->getVar("alias") . $new_site_temporary_url;
$tpl->setVar('alias',$server_alias_str);
Reply With Quote