0
我曾作过的网站的移动版本(在其他文件夹与第二的index.html)如何移动网站重定向到正常的版本
我用这个脚本从桌面版的移动重定向手机版
if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/iPad/i)){
window.location.href = "http://m.website.net" + document.location.hash;
}
工作的很好,但问题是,共享移动版本的人发送人移动,由于移动网址。所以,我试图把它们自动重定向到桌面版类似这样的
if (! navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/iPad/i)){
window.location.href = "http://www.website.net" + document.location.hash;
}
,关于iphone的工作,但创建与iPad无限循环,我该怎么办吗? 我只能用JavaScript来做到这一点
我不能使用脚本一样,因为iPad的视网膜和其他决议
哦,来自我的愚蠢的错误,谢谢! – kaiz3r