Skip to content

Instantly share code, notes, and snippets.

@eit
Created March 22, 2013 09:27
Show Gist options
  • Save eit/5219996 to your computer and use it in GitHub Desktop.
Save eit/5219996 to your computer and use it in GitHub Desktop.
<script>
if ((navigator.userAgent.match(/iPhone/i)) ||
(navigator.userAgent.match(/Android/i)) ||
(navigator.userAgent.match(/iPod/i))||
(navigator.userAgent.match(/Windows Phone OS 7/i)))
{
location.replace("mobile.aspx");
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment