Little PHP hacks for redirection on admin console
Posted: Tue Mar 22, 2005 12:25 am
I've slightly modified admin/login.php and admin/logout.php since i find the redirection page a little annoying, so here is the mod :
logout.php, replaced :
echo ('Logging in... please waitLog
ging out. Redirecting to login page...');
with :
if (!headers_sent())
{
header("HTTP/1.1 302 Found");
header("Location: ./index.php");
exit();
} else {
echo ('Logging in... please waitLog
ging out. Redirecting to login page...');
}
the same code apply on login.php (with modification of the url of course).
logout.php, replaced :
echo ('Logging in... please waitLog
ging out. Redirecting to login page...');
with :
if (!headers_sent())
{
header("HTTP/1.1 302 Found");
header("Location: ./index.php");
exit();
} else {
echo ('Logging in... please waitLog
ging out. Redirecting to login page...');
}
the same code apply on login.php (with modification of the url of course).