Whois:

Sometimes daily ramblings & articles from a 30 something developer from North West England. Passionate about not just web standards, but all things life. Long time user of Debian/GNU Linux for Web Servers & my Desktops. >>>


» 16/01/2006, 11:20:34 / / / Subscribe

Always fun to catch them out. Problem is trying to stop them can cripple not only your own server but also anyone who you want to share your content with who you're more than happy to let hotlink it. In a perfect world you'd have everyone take a copy of your image or whatever but it just isn't practical, especially when that media might change. I recently suffered this problem, and still do. I still do because I'm still deciding on what to do. I can see by my log that someone has hotlinked the "pod" image from the music list of the right side. The request comes from a forum which is locked off and requires you to actually fax to the owners a copy of this to be authorised to log in (which is pretty heavy really). As you may or may not know it's written in Turkish, shame I have a friend who lived there for years, no problems in knowing what it says. Aside that we have some clever bod on myspace who has a "friend" who decided to hotlink the "the rising dragon" music image. You'd think people would get a life, get some eyesight and realise that the copyright logo at the bottom means in lamer terms: "Don't steal my stuff thanks", alas no.

So whats a geek to do?

Well I emailed the Myspace user and politely requested that they remove the comment that hotlinks my image. No response as yet but hey I'm a patient man. The forum which is hotlinking that is Turkish will fall foul of the power and Voodoo of Mod_Re-Write and below is the simple rule by which I will block them.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://[^./]*\.tek.org.uk [NC]
RewriteRule \.(png|gif|jpe?g)$ - [NC,F]

That added to my .htaccess file will basically block everyone that is not coming from my domain. No request outside of tek.org.uk can access images. This is all well and good but I have particular sites that I myself have hotlinked images too. Ratatak being one of them. So I can simply adjust the rule set slightly to allow ratatak to hotlink to my media content.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://[^./]*\.tek.org.uk [NC]
RewriteCond %{HTTP_REFERER} !^http://[^./]*\.ratatak.com [NC]
RewriteRule \.(png|gif|jpe?g)$ - [NC,F]

I can, of course, continue to add whomever I like to the ruleset.

The revolution is not coming hotlinkers. The resistance continues.

Tagged Under: , , , .

Technorati:

Comments:

#1. skeddy
16/01/2006, 17:39:05

I used to (and still have) the same issue on my site. Sadly the sfotware behind the scene doesn't allow me to see which files are actually being hotlinked, but in the end I used the same Rewrite tips that you mentioned (In an earlier post too).

I had great fun redirecting anyone linking my images to a "This image has been stolen" image, wored rather nicely, the complaints came flooding in - ergo - don't steal my images !!

I was racking my brain trying to remeber the site that had their CSS Style taken and directly linked too. In the end she changed her's, and with the linked one changed it to Gay Pron. Nice way to wake up and see your website . . . . . .

#2. StatVoid
18/01/2006, 02:52:22

I hate when people hotlink shit but that hasn't happened to me yet, at least as far as I know, with my current site.

I'd hit that MySpace chick, though I find it funny she calls herself "TeK"...I think she ripped you off and is now shocked you caught her. She deserves a roundhouse kick to the face from Chuck Norris.

#3. tek
18/01/2006, 19:40:48

Sadly the sfotware behind the scene doesn't allow me to see which files are actually being hotlinked


Your raw server log should let you easily see! Yeah I kinda forgot I'd posted it before, oops chessy

She deserves a roundhouse kick to the face from Chuck Norris.


Couldn't agree more but lets see if she just removes it first before I change it for something else that will force her to change it wink

Add your comments below:

Required

Required

  CAPTCHA imageRequired (enter the six letters)

64-bit 2007 6280 accessibility Accessibility advert ajax angry annoyed apache arcticmonkeys article articles artlab b3ta beast bed bind blog blogging blogs blogsphere bob dylan Boer bookmarklets booze bots browsers bt bunnies bush bye chelsea tractor Chernobyl childhood cms coding coffee cold community copyright cpu cracker dad dark arts DDoS debian design designer development diamonds diy dog dogpile domain Don Ross dragon drm Ebaumsworld email emo en end essex everything exploit Feeling Good firefox Firefox flu fog formats free freedom freelance friday fuck you furQ geek germs google gravatar greenpeace hacker handset hangover hawkwind Helm hindu history Holocaust horse the band hospital hosting hotlinkers humour hype idiot ie ie7 ill images independence indie industry ipaq iraq ireland javascript job kanotix kernel keywords KG800 knoppix legal LG LGChocolate lies linux Linux Lohan lyrics marketing masters of war meme microsoft moblog mod_rewrite mothership motorola mozilla mum music myspace mysql neil net neutrality network new year new_year Nina Simone nirvana nokia nokia6280 northwest nothing office move p2p palm paperless office parties perl phishing photos php piercings plane pmwiki promotion python rant Razr rdf regex renegade resistence resources review rising risingdragon rising dragon hosting rob dougan ror router ruby santa sarge script kiddie security SEO server seven deadly sins shambo slaughter sleep snow Somme so what spam spammers ssh statement strike stuff stupid sun surname techno technorati tek tengine terrorism thinking tikiwiki time torture training tribe twitter ubuntu unix uptime URI US V3 v3 vets viagra video voodoo voyager220v vulnerability wales War war WC3 weapons web web-tribe web2.0 web 2.0 webmaster Web Standards wedding windows wokingham woo woody wordpress work WP WWI xmas xp Ypres ytmnd.com yule zero-day

Articles:

These articles are meant to help others that perhaps come across similar issues I had with Debian/GNU Linux or development of some kind. Others might just be of a rather random nature. I will try to keep up with any questions, responses, comments and even flames added to them. I am however not resposible for any "rm -rf * type issues that might occur, consider the previous words as my legal disclaimer :-)


» 11/08/2005, 22:12:41 / Comments (3) / Printable / Subscribe


» 24/05/2005, 23:28:12 / Comments (12) / Printable / Subscribe

Friends:

Bumble / Ratatak / Mal / Neil / Bizzos / Skeddy / Thinkattack / Nefariousmuse / Static Silence / Growchat / Bawdeep / Tristan / David Bamford / Narelle / Monday by Noon / Angry Ginger / Inkognitoh / Bob / Caolan

Moblog:

    • 06/06/07 - 07:06:27 :: Mmm... :: Bbq 12/03/07 - 06:03:40 :: New moblog :: does this still work? 10/05/06 - 08:05:45 :: Its all about the moon... No wait... :: its all about the sun yer know. 03/05/06 - 09:05:54 :: I said good morning :: its morning and i already wanna go to bed 27/03/06 - 11:03:44 :: Oh :: yes yes 05/03/06 - 07:03:41 :: Quick snack :: nice bit of soup!
    • 02/03/06 - 01:03:32 :: Yum. Subway rawks! :: considering its a foot long i think thats a real buttie! 11/02/06 - 01:02:24 :: ... :: it would appear not! 24/01/06 - 10:01:09 :: tek :: err me 16/01/06 - 07:01:21 :: Beer! :: indeed! 16/01/06 - 12:01:12 :: LOL! :: what a fantastic name for a shop! 15/01/06 - 04:01:04 :: Yep! :: nights in with the bavaria
    • 08/01/06 - 11:01:29 :: Mmm revels! :: tasty 19/12/05 - 04:12:49 :: Interesting :: strange pic taken on the way to a meeting 16/12/05 - 11:12:31 :: Woo! :: The Red Wings 15/12/05 - 10:12:26 :: ... :: out of the dust 05/12/05 - 02:12:08 :: aye! :: booty booty 04/12/05 - 12:12:14 :: Oh yes :: its only going to get more banging woo yay!