Here's how I do this:
My site may be accessed by users going to solanapoint.com or ad2adnetwork.com<?
$mystring=strtolower ($HTTP_HOST);
$pos = strpos($mystring, "solana");
if ($pos === false) { // note: three equal signs
header("Location: http://ad2adnetwork.com/index2.html"); / Redirect browser /
exit;}
else {
header("Location: http://solanapoint.com/index3.htm"); / Redirect browser /
exit;}
?>