Useragent redirection not working in functions.php or header
-
$useragent=$_SERVER[‘HTTP_USER_AGENT’];
if(preg_match(‘/iphone|ipod|android/i’,$useragent))
header(‘Location: https://mysite.com/mobile/’);I have put this text above everything else in the header and also in the functions file on some WP installs and it works great, but then in this one it won’t work at all. the site is hotelandra.com
I really need this to work… any ideas?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Useragent redirection not working in functions.php or header’ is closed to new replies.