Private_Guy
08-19-2007, 05:54 PM
Hi there,
My script has an install.php file which if it exists, I want it to redirect to the install.php file. I entered this code in index.php:
//----------------------------
// Checking If Install File Exists!
//----------------------------
if(is_dir('./install.php') and $_SERVER['HTTP_HOST'] != 'localhost')
{
header("Location: ./install.php");
die();
}
//----------------------------
// Finished Checking
//----------------------------
But it didn't work, it just views index.php naturally, even if install.php exists, what I'm I doing wrong?
Many thanks for your help.
Best Regards,
Private_Guy
My script has an install.php file which if it exists, I want it to redirect to the install.php file. I entered this code in index.php:
//----------------------------
// Checking If Install File Exists!
//----------------------------
if(is_dir('./install.php') and $_SERVER['HTTP_HOST'] != 'localhost')
{
header("Location: ./install.php");
die();
}
//----------------------------
// Finished Checking
//----------------------------
But it didn't work, it just views index.php naturally, even if install.php exists, what I'm I doing wrong?
Many thanks for your help.
Best Regards,
Private_Guy