Join for FREE | Take the Tour Lost Password?

deviantART

 
About Me Premium Member Programmer Echilon18/Male/United Kingdom Recent Activity Deviant for 4 Years
2 Month Premium Membership
Statistics 39 Deviations
122 Comments
3,480 Pageviews

Visitors

Stop Stealing My Bandwidth!

Journal Entry: Fri Jan 5, 2007, 10:42 AM
I checked my server logs last night, just to see if there was anything interesting. I use two different domains, one for my blog and one for images I use on forums and the like, so the logs for mi6.nu, my images domain are like a breadcrumb trail of my last month's browsing. I was pretty surprised to see a few URLs I'd never heard of as the referrers. A finnish site about Lordi was one and MySpace.com was the other. I hate MySpace, and there's no way I'd have wasted my bandwidth hosting pictures for it. The images being linked was Contemplating Existence, a wallpaper I made last year. Some Idiot was using the image as his background. It's great that he liked my wallpaper but firstly it's my property, he can't use it without my permission, and secondly, it's over 200KB, and was loaded 350 times in December. That's 65MB of bandwidth I've paid for!



I decided to teach the leech a lesson using .htaccess, which lets you serve up a different image for specified referrers. Inspired by a recent blog post I'd read, I thought the Goatse pic would be a good choice. For anyone that doesn't know, Goatse was a site available at the turn of the millenium which scarred millions of impressionable AOL kiddies. Now whenever someone from an external site tries to use one of those images, they'll get a nice surprise. Let that be a lesson to anyone else who's thinking of leeching my bandwidth! The MySpace guy's changed his background, but the site about Lordi's still using that dodgy background.


For anyone that's interested, this is the .htaccess file for Apache. The second and fourth lines tell apache to apply the rule for any host other than leghumped.com, the third and fifth lines tell it to serve up the no-hotlinking image instead of the requested URL.

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^[link])$ [NC]
RewriteRule ^images/lordi\.png$ images/nolink.png
RewriteCond %{HTTP_REFERER} !^[link])$ [NC]
RewriteRule ^images/tesla\.jpg$ images/nolink.png


For anyone that's interested, this is the .htaccess file for Apache. The second and fourth lines tell apache to apply the rule for any host other than leghumped.com, the third and fifth lines tell it to serve up the no-hotlinking image instead of the requested URL.

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^[link])$ [NC]
RewriteRule ^images/lordi\.png$ images/nolink.png
RewriteCond %{HTTP_REFERER} !^[link])$ [NC]
RewriteRule ^images/tesla\.jpg$ images/nolink.png
  • Mood: Rage

deviantID

Devious Info

  • Current Residence: Chester, England
  • deviantWEAR sizing preference: S
  • Favourite genre of music: Rock/Techno
  • Operating System: Vista Ultimate
  • MP3 player of choice: 16GB iTouch
  • Favourite cartoon character: Fry (Futurama)
  • Personal Quote: Never put both feet in your mouth at the same time, because then you don't have a leg to stand

Comments


:iconlittle-stock:
Thank you very much for the :+devwatch: :heart:
:icontatice:
Thank you for the watch :D

--
French Graphic Designer 8-)
:icongrafixeye:
:wave: :w00t:
Thank you for the :+devwatch:
:handshake: :blowkiss:

--

| Everything has beauty, but not everyone sees it |
|
:iconpoinkraven:
Thanks for the watch :3

--

| Website. | Liz.<3 |

:pee::tea:

~lolnazis
:iconcyclonenimrod:
Thanks for visiting my page :) Love your journal. :D

NiM.

--
CycloneNimrod™
Matthew Kneale
Experimental Photographer
cyclonenimrod@gmail.com

:iconj4m3sb0nd:
Thanks for watching!

--
The future belies your preconceptions...
:icondimage:
Many Thanks for the Fav
:iconeastblu:
thanks for the watch!

your stuff is beautiful!

im gonna have to watch you aswell!

-eastblu

Site Map