Achei isto na web, testei e funcionou:
var userAgent = navigator.userAgent.toLowerCase(); var devices = new Array('nokia','iphone','blackberry','sony','lg', 'htc_tattoo','samsung','symbian','SymbianOS','elaine','palm', 'series60','windows ce','android','obigo','netfront', 'openwave','mobilexplorer','operamini'); var url_redirect = 'http://mobile.seusite.com'; function mobiDetect(userAgent, devices) { for(var i = 0; i 0) { return true; } } return false; } if (mobiDetect(userAgent, devices)) { window.location.href = url_redirect;<script type="text/javascript">
var userAgent = navigator.userAgent.toLowerCase();
var devices = new Array('nokia','iphone','blackberry','sony','lg',
'htc_tattoo','samsung','symbian','SymbianOS','elaine','palm',
'series60','windows ce','android','obigo','netfront',
'openwave','mobilexplorer','operamini');
var url_redirect = 'http://mobile.seusite.com';
function mobiDetect(userAgent, devices) {
for(var i = 0; i < devices.length; i++) {
if (userAgent.search(devices[i]) > 0) {
return true;
}
}
return false;
}
if (mobiDetect(userAgent, devices)) {
window.location.href = url_redirect;
}
</script>
}
Onde esta "http://mobile.seusite.com" e so colocar o seu site ou Directory que quiser.