I have a simple question, below My JS function is to redirect the page if open using iPad.
I have a page mobile.abc.com, now what I want to do is redirect it if open using ipad to mobile.abc.com
if ((navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/iPod/i))) {
location.replace("../mobile.abc.com");
}
I tried the that JS, but it’s show wrong url to be : abc.com/mobile.abc.com
Any idea ?
Use:
This will work for both
httporhttps.