assuming this is ur entire page..
<?
$url = $_SERVER['HTTP_HOST'];
if($url=="www.ivcgroup.us") {
$redirect_url="/ivc/index.htm";
}
else
{
$urls = $_SERVER['HTTP_HOST'];
if($urls=="ivcgroup.us") {
$redirect_url="/ivc/index.htm";
}
else
{
$url = $_SERVER['HTTP_HOST'];
if($url=="www.fastcashnow.us") {
$redirect_url="/fcn/index.html";
}
else
{
$urls = $_SERVER['HTTP_HOST'];
if($urls=="fastcashnow.us") {
$redirect_url="/fcn/index.html";
}
else
{
$redirect_url="/fcn/index.html";
}
header("Location: $redirect_url"); // Redirect browser
exit; // Make sure that code below does
// not get executed when we redirect.
$redirect_url="/fcn/index.html";
}
header("Location: $redirect_url"); // Redirect browser
exit; // Make sure that code below does
// not get executed when we redirect.
?>
looks to me like you are missing 3 }'s
indenting your code can easily help you spot these..
if youre trying to do this:
<?
$url = $_SERVER['HTTP_HOST'];
if($url=="www.ivcgroup.us") {
$redirect_url="/ivc/index.htm";
}
else
{
$urls = $_SERVER['HTTP_HOST'];
}
if($urls=="ivcgroup.us") {
$redirect_url="/ivc/index.htm";
}
else
{
$url = $_SERVER['HTTP_HOST'];
}
if($url=="www.fastcashnow.us") {
$redirect_url="/fcn/index.html";
}
else
{
$urls = $_SERVER['HTTP_HOST'];
}
if($urls=="fastcashnow.us") {
$redirect_url="/fcn/index.html";
}
else
{
etc....
where all of the ifs are seperate checks and wont only run if the else condition is satisfied, then do that..
but if you want the if statements in the else statements, use your code, and add
}
}
}
php?>
at the bottom