View Single Post
  #5  
Old 24th September 2012, 12:29
felan felan is offline
Junior Member
 
Join Date: Aug 2012
Posts: 22
Thanks: 1
Thanked 11 Times in 5 Posts
Default

Been playing around with this solution but I can't really get it to work, where the solution from Radim_h's friend works fine. I am also wondering if this would be possible to set as a checkbox so we can remove this when not needed anymore?

Quote:
Originally Posted by omig View Post
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