<script type="text/javascript">
var mobiles = array["iPhone", "iPod"];//mobile devices
var i;
for(i=0;i< mobiles.lenght;i++){
//testing if the RE matches the mobile agents
var er = new RegExp(mobiles,"i");
if( er.test( navigation.userAgent ) ) {
window.location = "http://mobile.mysite.com/" ;
}
}
</script>
Find more questions by tags Mobile sitesAndroidWeb Development