I've tried this:
<?
$sname = $_SERVER["HTTP_HOST"];
$sname = strtoupper($sname);
if (instr($sname,"PRATTANDCO.COM") != 0) {
response.redirect "prattandco.com";
} elseif instr($sname,"PRATTANDCO.NET") <> 0 then;
response.redirect "prattandco.com";
} elseif instr($sname,"ROBERTPRATT.COM") <> 0 then;
response.redirect "prattandco.com/page_id=9";
} elseif instr($sname,"ROBERTPRATT.NET") <> 0 then;
response.redirect "prattandco.com/page_id=9";
}
?>
and this:
$sname=$_SERVER["SERVER_NAME"];
$sname=strtoupper($sname);
if (_instr(0,$sname,"PRATTANDCO.COM",0) != 0) {
header("Location: /");
}
elseif (_instr(0,$sname,"PRATTANDCO.NET",0) != 0) {
header("Location: /");
}
elseif (_instr(0,$sname,"ROBERTPRATT.COM",0) != 0) {
header("Location: /page_id=9");
}
elseif (_instr(0,$sname,"ROBERTPRATT.NET",0) != 0) {
header("Location: /page_id=9");
}
function _instr($start,$str1,$str2,$mode) {
if ($mode) { $str1=strtolower($str1); $str2=strtolower($str2); }
$retval=strpos($str1,$str2,$start);
return ($retval===false) ? 0 : $retval+1;
}
And a couple different variations of those but I don't think they're right... I've been pasting them at the top of my wordpress's home page. The second one I think almost worked- it showed that it was looking for the right file in the address bar, but it couldn't find it...
I'm trying to convert from ASP, so I apologize for my stupidity