Forum Moderators: coopster
i am getting a redirect loop error code if i access this page in firefox and infinite loop with no error code if i access this page on IE:
<?phpif (!strpos(strtolower($GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT']),"playstation portable"))
{
header("location: ./index.php");
}
else {
header("location: ../index.php");
}
?>
the following is the code in the target page im trying to redirect to if device is NOT a psp (../index.php):
<?phpif(strpos(strtolower($GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT']),"playstation portable") ){
header("location: ./psp/index.php");}
if(strpos(strtolower($GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT']),"playstation 3") ){
header("location: ./ps3/index.php");}
if(strpos(strtolower($GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT']),"nintendo wii") ){
header("location: ./wii/index.php");}
if(strpos(strtolower($GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT']),"midp") ){
header("location: ./wap/index.php");}
?>
Can anyone see where i'm going wrong?