Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jason 86 posts 156 karma points
    Feb 05, 2015 @ 19:10
    Jason
    0

    Issue with iphone alt page package

    We were wondering if you wouldn’t mind providing some insight to an issue we are having with the iphonealtpage package?

    It works great, however, specifically we can’t figure out why it redirects on not only mobile devices but also desktop devices/PC’s/latops, etc.

    It would be perfect if it didn't redirect on normal (non-mobile) devices.

    We installed the package and then this is the code we added to the master template:

    <!-- BEGIN iphonealtpage -->
        <script language=javascript>
        if((navigator.userAgent.match(/iPhone/i))||
        (navigator.userAgent.match(/iPad/i))||
        (navigator.userAgent.match(/Android/i))||
        (navigator.userAgent.match(/iPod/i)||)))
        {
        document.location.href='http://ourmobilesite.com/';
        }
        </script>
    <!-- END iphonealtpage -->

     

    Thanks in advance.

Please Sign in or register to post replies

Write your reply to:

Draft