I was checking my wordpress admin panel, and noticed a new incoming link today. Oh cool, I thought. Someone nice has linked to me. I opened up the link to check it out and there was my article on how to set up a cisco router as a webserver. The whole thing. Images. Dynamips/Dynagen .net files. Everything! Everything copied word for word with someone else claiming they had written it down the bottom! And he/she had the gall to hotlink to my images! Grrrrr
I guess once your blog becomes popular enough that people start stealing your content, its kind of a milestone, but it kind of pissed me off. I read Lorelle’s fantastic post on what to do when someone steals your content, and shot of a few email’s which were ignored. I had to do something to protect my content. Hotlinking like this is just plain rude!
I fired up notepad and with a bit of research on apache’s mod_rewrite I have implemented this:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://ardenpackeer.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.ardenpackeer.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !google\. [NC]
RewriteCond %{HTTP_REFERER} !^http://www.feedburner.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/ardenpackeer.*$ [NC]
RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png|txt|net)$ /nolink.jpg [NC,L]
I copied this .htaccess file to my uploads directory under wordpress. Now when someone hotlinks they get something like this:

The Rewrite Condition is basically saying if a link is not from ardenpackeer.com, google, feedburner, then redirect all images to http://ardenpackeer.com/nolink.jpg. Its probably not perfect, but it did the job!
I could of been evil and did something like:
RewriteRule .*\.(jpe?g|gif|bmp|png|txt|net)$ http://goatse.cz/ [NC,R]
Using the [NC,R] you can redirect them to whatever site (or picture) you want >-).
I’m going to have to put a watermark image on my pictures now! I hope this helps someone else who is facing a similar problem.
“I could of been evil and did something like:
RewriteRule .*\.(jpe?g|gif|bmp|png|txt|net)$ http ://goatse.cz/ [NC,R]
Using the [NC,R] you can redirect them to whatever site (or picture) you want >-).”
LOL!!!
I will definitely not be hotlinking to any of your images! :-)
Heheh. I saw soooo tempted….