example:
<?PHP
switch ($HTTP_HOST) {
case "www.firstdomain.com":
header("Location: /firstdirectory/index.php");
break;
case "www.seconddomain.com":
header("Location: /seconddirectory/index.php");
break;
case "www.thirddomain.com":
header("Location: /thirddirectory/index.php");
break;
default:
header("Location: site_index_page.html");
)
?>
Note the default page at the end. You should have a page like this in the root directory that has links to the individual site directory/pages. This is because old browsers that are not HTTP/1.1 compliant do not set the HTTP_HOST environment variable. I have also seen some crappy proxies convert directly to the IP, so this helps with that problem as well.
Hope this helps,
-- Rich --