Redirect Script for only certain URLs
I am trying to save some $$ on hosting (I know should probably pony up for separate hosting) and want to redirect two specific URLS that are going to my current site (I have three domains pointing to my site). I have setup the domain pointers through my host and essentially have two sites in one directory. I tried using the below script but it redirects all URLS not just the two I specificed. Any help would be great:
$referer = $_SERVER['HTTP_REFERER'];
if ( $referer != "http://mydomain2.com" || "http://mydomain3.com" ) {
header('Location: index2.php');
exit;
};
Thanks