1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to redirect mobile traffic to mobile offers and web traffic to web offers?

Discussion in 'Black Hat SEO' started by Moogle!, Apr 11, 2015.

  1. Moogle!

    Moogle! Regular Member

    Joined:
    Dec 27, 2010
    Messages:
    350
    Likes Received:
    52
    Location:
    Pearl of the Orient
    What's the easiest way to do this?
     
  2. lagger

    lagger Power Member

    Joined:
    May 10, 2011
    Messages:
    511
    Likes Received:
    183
    Code:
    <head>
    
    <title>Title</title>
    
    <script type="text/javascript">
    
    <!--
    
            var getStr = window.location.search.substr(1);
    
            var getArray = getStr.split ("&");
    
            var get = {};
    
    
    
            for ( var i = 0; i < getArray.length; i++) {
    
            var tmpArray = getArray[i].split("=");
    
            get[tmpArray[0]] = tmpArray[1];
    
            }
    
    
    
           if (get.m == "yes") {
    
                    window.location = "http://m.example.com"
    
            }
    
            else if (get.m == "no") {
    
                    window.location = "http://www.example.com";
    
            }
    
    
    
     //-->
    
    </script>
    
    </head>
    http://lmgtfy.com/?q=mobile+browser+redirect+script
     
  3. jamie3000

    jamie3000 Supreme Member

    Joined:
    Jun 30, 2014
    Messages:
    1,311
    Likes Received:
    587
    Occupation:
    Finance coder looking for semi-retirement
    Location:
    uk
    There is also a big database of mobile user agents if you want to do the redirect server side
     
  4. m4dm4n

    m4dm4n Regular Member

    Joined:
    Sep 15, 2010
    Messages:
    223
    Likes Received:
    92
    Occupation:
    /dev/full
    Location:
    /dev/urandom