$url1 = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$url2 = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
$url2 = str_replace('index.php', '', $url2 );
if($url1 == $url2)
{
@header("Location: index.php?page=portal");
exit;
}
http://www.pbboard.info/forums/index.php
http://www.pbboard.info/forums
<?php
$foldr_forum_name = "http://www.XXX.com/XXX/index.php?page=portal";
$redirectcode = 303;
$url = $foldr_forum_name;
@header("Location: $url", 0, $redirectcode);
exit;
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>إعادة التوجية إلى المجلة</title>
<META http-equiv="refresh" content="0;URL=http://www.XXX.com/XXX/index.php?page=portal">
</head>
<body>
</body>
</html>