Here´s an exemple in php:
Code:
<?php
if(strstr($_SERVER['HTTP_USER_AGENT'],'Android') ||
strstr($_SERVER['HTTP_USER_AGENT'],'webOS') ||
strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') ||
strstr($_SERVER['HTTP_USER_AGENT'],'iPod')) {
header('Location: http://www.google.com');
exit;
}
?>
and one in javascript
:
Code:
var uagent = navigator.userAgent.toLowerCase();
if(uagent.indexOf('android') ||
uagent.indexOf('webos') ||
uagent.indexOf('iphone') ||
uagent.indexOf('ipod')){
document.location = 'http://www.google.com';
}
Hope this can help you
