1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Stupid Pet Tricks with mod_rewrite

Discussion in 'Apache' started by hulkster, Mar 27, 2004.

  1. #1
    While I don't block outside referrals to the images on my site (kinda humourous to see what people use/link to), I occasionally like to have a little bit of fun with people that do if they don't ask permission first.

    So my nightly Analog reports show another BBQ auction on eBay ... and the seller decided to use some pictures from my site - here are my pictures of the Member's Mark BBQ he is using/linking to on the auction ... but I decided that his auction would look a LOT better if his eBay page showed a picture of the Smallest BBQ Grill instead! ;-)

    I used a .htaccess file and mod_rewrite to do this - looks like this:
    RewriteEngine on
    RewriteCond %{HTTP_REFERER http://cgi.ebay.com/.*
    RewriteRule .*\.jpg$ smallest_bbq_grill_0660.jpg [L]
    SEMrush
    I actually did this about Midnight last night (about 7 hours ago), but he hasn't noticed yet ... it's somewhat subtle since if you go to my web site, all looks well - it's ONLY if you are coming from Ebay that you would see the switch. Additionally, his browser/ISP/etc. may not show the new image due to caching affects.

    Here is the actual Ebay auction.

    alek

    P.S. It's awful tempting to put a "Boobies pictures" or something like that there, but I'm a family man, so I restrained myself ... at least this time! ;-)
     
    hulkster, Mar 27, 2004 IP
    SEMrush
  2. sarahk

    sarahk iTamer Staff

    Messages:
    26,110
    Likes Received:
    3,814
    Best Answers:
    108
    Trophy Points:
    665
    #2
    Hey Alek

    He's onto you!

    You could also do with buying a copy of Adobe Photoshop and using their "save for the web" feature to trim the size of those photos.

    Sarah
     
    sarahk, Mar 27, 2004 IP
  3. hulkster

    hulkster Peon

    Messages:
    1,705
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Are you sure?

    I just loaded the CGI page in IE (which I rarely use, so should be no caching affects - I have my VPN OFF) and it looks like he's still getting the "little guys" on the auction page - look about halfway down.

    He's only linking to that one image on my site, so that's all I could do.

    alek

    P.S. Yea, a lot of the graphics on the web site were just regular "Save" from Photoshop, so they still have EXIF info and other misc. I'm starting to pay more attention to this and one of these years/decades, I'll go back and clean up the old stuff.
     
    hulkster, Mar 27, 2004 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    26,110
    Likes Received:
    3,814
    Best Answers:
    108
    Trophy Points:
    665
    #4
    Aaaah, the images on the 3 pages were taking so long to load I didn't scroll down and see it. I was just looking at the top.

    The photo you chose is gorgeous. Those boys are having a good laugh!

    Sarah
     
    sarahk, Mar 27, 2004 IP
  5. OnSpec

    OnSpec Peon

    Messages:
    18
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I love it when an intruder gets his/her do. Play with fire you get burnt Sparky!
     
    OnSpec, Mar 28, 2004 IP
  6. hulkster

    hulkster Peon

    Messages:
    1,705
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Cute - I guess I could provided some some images from my BBQ Fire Testing which would have been appropriate based on your comment - the last one has always been a bit of a favorite as I've seen others pick it up at various web sites.

    alek

    P.S. While I started this thread partly for the "fun factor", I see people ask questions along these lines and thought a simple example of the power of mod_rewrite might have been interesting to folks.
     
    hulkster, Mar 28, 2004 IP
  7. hulkster

    hulkster Peon

    Messages:
    1,705
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I noticed some folks were hot-linking my flag GIF's associated with my IP Address to Country lookup tool for various country flags ... so now, no matter which flag they link so, they'll get this good 'ol USA flag

    You can see some examples in this forum and this one

    I could have put ANYTHING displayed there, but I'm not a mean person, and figured this would not only get the point across, but also be patriotic! ;-)

    alek
     
    hulkster, Jun 20, 2004 IP