var ua = navigator.userAgent; if ((ua.match(/iPhone/i)) || (ua.match(/Android/i))) { location.replace("music-teacher-application-mobile.html"); }