You Could Use PHP to do this
<?php
$subd = $_SERVER['HTTP_HOST'] ;
$pass1 = str_replace("http://", "", $subd);
$pass2 = explode(".", $pass1);
$subdomain = $pass2[0];
$this_url = $_SERVER['HTTP_HOST'] ;
$this_url = str_replace(".co.uk", "", $this_url);
$this_url = str_replace(".com", "", $this_url);
$this_url = str_replace(".net", "", $this_url);
$this_url = str_replace(".org", "", $this_url);
$this_url = str_replace($subdomain.".", "", $this_url);
if ((file_exists("./".$this_url)) && (!file_exists("./domains/".$this_url))){
echo "<html>\r\n".
"<head>\r\n".
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\r\n".
"<title>".$this_url.".co.uk</title>\r\n".
"</head>\r\n".
"<frameset rows=\"100%,*\" border=\"0\" framespacing=\"0\" frameborder=\"0\">\r\n".
"<frame src=\"http://www.yoursite.com/".$this_url."/\">\r\n".
"</frameset>\r\n".
"<noframes>\r\n".
"<body>\r\n".
"The website for ".$_SERVER['HTTP_HOST']." can be found by clicking <a href=\"http://www.yoursite.com/".$this_url."/\">here</a>.\r\n".
"</body>\r\n".
"</noframes>\r\n".
"</html>\r\n";
}
if ((file_exists("./".$this_url)) && (file_exists("./domains/".$this_url))){
$domain_details = file("./domains/".$this_url);
echo "<html>\r\n".
"<head>\r\n".
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\r\n".
"<title>".$domain_details[0]."</title>\r\n".
"</head>\r\n".
"<frameset rows=\"100%,*\" border=\"0\" framespacing=\"0\" frameborder=\"0\">\r\n".
"<frame src=\"http://www.yoursite.com/".$this_url."/\">\r\n".
"</frameset>\r\n".
"<noframes>\r\n".
"<body>\r\n".
"The website for ".$_SERVER['HTTP_HOST']." can be found by clicking <a href=\"http://www.yoursite.com/".$this_url."/\">here</a>.\r\n".
"</body>\r\n".
"</noframes>\r\n".
"</html>\r\n";
}
if (!file_exists("./".$this_url)){
echo "<html>\r\n".
"<head>\r\n".
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\r\n".
"<title>Error</title>\r\n".
"</head>\r\n".
"<table width=\"100%\" height=\"100%\">\r\n".
"<tr>\r\n".
"<td align=\"center\" valign=\"middle\">\r\n".
"An Error Has Occurred\r\n".
"</td>\r\n".
"</tr>\r\n".
"</table>\r\n".
"</body>".
"</html>\r\n";
}
?>
I made this to deal with such problems and mask url's but still the best way of doing what you suggest would use a more complex system than this :rolleyes: