1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest Last month we upgraded BlackHatWorld.com to a new platform - . If you notice anything that requires attention please start a new thread here.
    Dismiss Notice

Double Meta Refresh With .htaccess Method

Discussion in 'Cloaking and Content Generators' started by digitalpower, Jan 9, 2009.

  1. digitalpower

    digitalpower BANNED BANNED

    Joined:
    Dec 16, 2008
    Messages:
    303
    Likes Received:
    69
    I've been messing around with methods posted here and made a double meta refresh and .htaccess combination cloaking method.

    Create page1.php that contains the following code:

    HTML:
    <html>
    <head>
    <?php
    echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.yourdomain.com/page2.php\">";
    ?>
    </head>
    <body>
    </body>
    </html>
    Create page2.php that contains the following code:

    HTML:
    <html>
    <head>
    <?php
        $referer = $_SERVER['HTTP_REFERER'];
        if($referer == "") {        
    	echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.yourdomain.com/page3.php\">";		
        }
    ?>
    </head>
    <body>
    </body>
    </html>
    Create page3.php that contains the following code:

    HTML:
    <html>
    <head>
    <?php
        $referer = $_SERVER['HTTP_REFERER'];
        if($referer == "") {        
    	echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.youraffiliatedomain.com?querystring=whatever\">";		
        }
    ?>
    </head>
    <body>
    </body>
    </html>
    Finally create a .htaccess file that contains the following:

    Code:
    Redirect 301 /page3.php http://www.youraffiliatedomain.com?querystring=whatever
    You need a web host that supports .htaccess and PHP for this to work so 000webh0st this will work great. When you send the user to page1.php either directly or from a hyperlink on another domain, the code above will blank the referrer and also make it so the user cannot see your affiliate link in the address bar of the web browser. In the case that the .htaccess file fails, the user will still be redirected to the affiliate link but it will be visible in the address bar. Please let me know if you see any issues with this or if you think this can be improved further.
     
    • Thanks Thanks x 2
    Last edited: Jan 9, 2009
  2. jaymartins

    jaymartins Newbie

    Joined:
    Jan 9, 2009
    Messages:
    31
    Likes Received:
    51
    WOW - Very well explained - I'm going to try this out tomorrow morning.
     
  3. zongoneri

    zongoneri Junior Member

    Joined:
    Jun 2, 2008
    Messages:
    107
    Likes Received:
    42
    I will try also, i give feedback a later... just testing 1st...
     
  4. pinholeglasses

    pinholeglasses Newbie

    Joined:
    Jan 30, 2009
    Messages:
    33
    Likes Received:
    74
    Hmm this seems to be exactly what I'm looking for, but it's not working for me. If one of you coding experts could help me out I'd really appreciate it.

    Basically, I want:

    1. a double meta refresh to blank referrer

    2. the address bar url to stay the same (to hide the fact that it is an affiliate link.)
    I have read that mod_rewrite works well for this purpose, but I don't know how to implement this.
     
    Last edited: Feb 16, 2009
  5. hyp959

    hyp959 Registered Member

    Joined:
    Feb 20, 2008
    Messages:
    53
    Likes Received:
    78
    Occupation:
    CEO
    great share
    i will try it
    thanks
     
  6. pinholeglasses

    pinholeglasses Newbie

    Joined:
    Jan 30, 2009
    Messages:
    33
    Likes Received:
    74
    Actually, I don't even need a double meta refresh. I just need to redirect my domain to the affiliate link AND maintain my domain url.

    So I want to put a link to h_ttp://w_ww.mydomain.com/ in an article, which redirects to h_ttp://affiliatelink.com/affid=34344 WITHOUT h_ttp://affiliatelink.com/affid=34344 showing up in the address bar. It would be great if mydomain.com showed up in google results as well.

    Anyone have a suggestion?
     
  7. Barbacamanitu

    Barbacamanitu Jr. VIP Jr. VIP Premium Member

    Joined:
    May 8, 2008
    Messages:
    500
    Likes Received:
    91
    just iframe the offer... url will be the same in the address bar.
     
  8. karpaltunnel

    karpaltunnel Registered Member

    Joined:
    Feb 23, 2008
    Messages:
    67
    Likes Received:
    11
    agree.. or insert ur code in a pic..:) load it via iframe execute it as code 1 pixelx1pixel..

    and ur stuffing goes perfekt :D