You <i>CAN</i> do this in php by checking switching on the contents of $HTTP_HOST:
switch $HTTP_HOST {
case 'www.site1.com':
header("Location: /site1/");
break;
case 'www.site2.com':
header("Location: /site2/");
break;
}
But if you are with a hosting company, then you probably are already on a virtual server (unless they gave you a dedicated server?). They should already have mechanisms for handling multiple domains. For instance, on servers running *nix + Apache, you would modify your apache.conf file to re-direct different domain requests to their appropriate directories. This is much more efficient than the above method
-- Rich