Tam deneyemedim, cep telefonda denedim tek ve çalıştı. Bu kod blogspot.com da kullanılıyor, ben kodu alıp biraz değiştirdim.
<script type="text/javascript">
var a = navigator,
b = "userAgent",
c = "indexOf",
f = "&m=1",
g = "(^|&)m=",
h = "?",
i = "?m=1";
function j() {
var d = window.location.href,
e = d.split(h);
switch (e.length) {
case 1:
return d + i;
case 2:
return 0 <= e[1].search(g) ? null : d + f;
default:
return null
}
}
if (-1 != a[b][c]("Mobile") && -1 != a[b][c]("WebKit") && -1 == a[b][c]("iPad") || -1 != a[b][c]("Opera Mini") || -1 != a[b][c]("IEMobile")) {
alert('Mobile');
window.location="mobile.html";
};
</script>