Hi guys i have a problem with redirect code and it says on mobile devices too many redirects occurred. Any solution with this code please?
also index page added
<?php include ("gez.php"); ?>i just want block to pc users to enter site and just let mobiles phones can access. Any solution like this?
<?
$mobile = array(
'Android',
'iPod',
'iPad',
'iPhone',
'webOS',
'BlackBerry',
'Windows Phone',
'Windows Phone',
'Opera Mini',
'IEMobile',
'Mobile'
);
if (preg_match('@('.implode('|', $mobile).')@si', $_SERVER['HTTP_USER_AGENT']) ){
//if mobile enter the site
header("Location: https://blogsitem.blog/");
die();
} else { //if pc back to google
header("Location: http://google.com.tr");
die();
}
?>