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

htaccess cookies and questions

Discussion in 'Black Hat SEO' started by ph4dge, Feb 26, 2008.

  1. ph4dge

    ph4dge Registered Member Premium Member

    Joined:
    Feb 7, 2007
    Messages:
    53
    Likes Received:
    2
    Using .htaccess I thought it should be possible to stuff 2 affiliate cookies at the same time using this method. It seems to sort of work the way I imagined, however it only seems to load the second affiliate cookie not the first one...

    I know I could use a simple iframe but I like the fact that viewing the source really doesn't give anything away using this .htaccess method.

    .htaccess file:
    Code:
    Redirect /pic1.jpg http://affiliate-1.com
    Redirect /pic2.jpg http://affiliate-2.com
    .html file:
    Code:
    <img src="http://www.domain.com/pic1.jpg" />
    <img src="http://www.domain.com/pic2.jpg" />
    any idea's
     
  2. ph4dge

    ph4dge Registered Member Premium Member

    Joined:
    Feb 7, 2007
    Messages:
    53
    Likes Received:
    2
    Just thought of something else, in firefox the non-existant images don't display as anything...just white space. Using IE7 shows broken link boxes...the box with a red cross through it. Anyway of avoiding this ugly red cross thing??
     
  3. doug

    doug Newbie

    Joined:
    Nov 4, 2008
    Messages:
    34
    Likes Received:
    103
    load a 1x1 clear .gif instead of nothing
     
  4. ph4dge

    ph4dge Registered Member Premium Member

    Joined:
    Feb 7, 2007
    Messages:
    53
    Likes Received:
    2
    That sounds perfect but how can I do that when the img source is really not there, just points to the affiliate link?
     
  5. doug

    doug Newbie

    Joined:
    Nov 4, 2008
    Messages:
    34
    Likes Received:
    103
    Instead of redirecting to affiliate link, redirect to a local php file which displays the 1x1, and opens the affiliate link. The path to that php file should be safely hidden in your .htaccess file. I'm going to play with it a bit, and will post my results.
     
  6. trophaeum

    trophaeum Senior Member

    Joined:
    Dec 21, 2007
    Messages:
    1,189
    Likes Received:
    706
    that isnt going to work with the 1x1 image, you are going to have your php script requesting the page from the other side and the cookie hits the php code and then if you send these back to the client they are set from YOUR DOMAIN not remote domain, also the most likely reason the cookie isnt being set is the privacy settings, google p3p http header or something like that and have a read of how ie now interprets this, a lot of affiliate sites dont set this so as to avoid some of the stuffing issues here
     
  7. ph4dge

    ph4dge Registered Member Premium Member

    Joined:
    Feb 7, 2007
    Messages:
    53
    Likes Received:
    2
    Thanks Doug, I'll give that a try and post the details
     
  8. ph4dge

    ph4dge Registered Member Premium Member

    Joined:
    Feb 7, 2007
    Messages:
    53
    Likes Received:
    2
    OK problem solved, no longer displaying that red X in IE - see below:

    Code:
    <img src="http://www.domain.com/pic2.jpg" width="1" height="1" border="0" align="middle" />
    however I seem to be left with the original issue that started this tread - doesn't seem to want to load both cookies for some reason.
     
  9. Butler

    Butler Registered Member Premium Member

    Joined:
    Feb 4, 2008
    Messages:
    71
    Likes Received:
    1
    Thanks for that bit of code, I couldn't get rid of them but all is good now :)
     
  10. Essential Clix

    Essential Clix Executive VIP Premium Member

    Joined:
    Jul 30, 2007
    Messages:
    1,755
    Likes Received:
    2,791
    Location:
    USA
    Are you using IE? I've noticed that IE seems to block the first cookie in a series, so maybe try loading 3 cookies with a "junk" cookie first in line. IE should catch that one, but miss the other 2.

    Try that and let me know if it works.
     
  11. firebeastm

    firebeastm Junior Member

    Joined:
    Dec 2, 2007
    Messages:
    120
    Likes Received:
    14
    red X is still showing for me.. ;/
     
  12. ph4dge

    ph4dge Registered Member Premium Member

    Joined:
    Feb 7, 2007
    Messages:
    53
    Likes Received:
    2
    Still no good, wont load the amazon cookie for some reason. The rest of the cookies are fine. I'll keep working on this and report my findings
     
  13. battman323

    battman323 Regular Member

    Joined:
    Aug 10, 2007
    Messages:
    449
    Likes Received:
    395
    Occupation:
    Extortionist
    Location:
    None of your damn business
    With amazon can I just load any old link or is there a "best" link to load as a stuffer?
     
  14. 10k

    10k Newbie

    Joined:
    Nov 26, 2007
    Messages:
    42
    Likes Received:
    0
    the red X is a problem when posting into forums ... any ideas, yet?
     
  15. sapo

    sapo Power Member

    Joined:
    Feb 25, 2008
    Messages:
    510
    Likes Received:
    281
    I'm looking also how to remove the red X on IE7 when posting img on forums