Earwax at Schmap
O'Reilly Network: Standalone Home Automation

Twitter as a Moral Compass

I recently learned a new word -- "splog." A splog is "spam blog" that takes content (often via RSS) from other sites and re-publishes it as their own, hoping to draw traffic to their own site.

You see, I've been splogged. A piece I wrote for 43Folders.com was republished by a blog in the Netherlands without crediting me or Merlin's site. I'm usually flattered when someone likes what I've written well enough to quote from it, and grateful when they acknowledge its source, but just taking an entire piece and reposting it is bad form, to say the least.

I tried to contact the owners of the offending site, but to no avail. Eventually (may my childhood pastor forgive me) my thoughts turned to revenge. The thieves are being lazy about swiping the content, so an image embedded in the piece is still pointing to its source on my server. (A practice known as "hotlinking.") I thought about getting revenge by substituting the correct image with an inappropriate one, as a way of communicating (albeit in a juvenile manner) my displeasure.

But I wasn't sure that I should so I turned to Twitter and asked my friends, and all of Twitter by inclusion, what they thought of my proposed reaction. "Do it! Do it!" came the replies, reminding me of a mob at a college party cheering on the drunk at the receiving end of a beer bong.

There were a few Twitterarians that suggested a more subtle approach, such as sending a smeared or odd-sized image, but no one suggested that I turn the other cheek.

Thus, having once again confirmed Differential Association theory, I began learning how to use Apache's "rewrite" module to make sure that the thieving website, and and no other website, displayed an alternate image when my stolen content was displayed.

My webhost offers a way to configure my site so that only approved sites can load my images, but I wasn't interested in whitelisting everywhere I want my content to appear. So, I had to write my own rewrite code, and I quickly found Stop Stolen Content with Apache mod_rewrite. This too was a whitelist approach, but it helped with the arcane rewrite syntax.

The example at SEO Black Hat was very useful, because by using the Borkweb Apache Rewrite Cheatsheet I was able to modify the code to key off the referrer header instead of the offending site's IP address. All that left me to figure out was how to intercept references to just the single file I was looking to substitute.

Here's the rewrite code I'm using:

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://www.example.nl/.*$ [NC]
RewriteRule ^SandyInDock.jpg$ http://www.g2meyer.com/blogsupport/thief.jpg [NC]

In this code, the thieving site is www.example.nl. (changed here because I'm not going to help publicize their actual domain). The file SandyInDock.jpg is the graphic that is referenced in the HTML they swiped, and the file thief.jpg is the substitute image that I'm sending instead of the original. (It's just a blank image in this example, I'll spare you from the rude version.) That's all there is to it. Stick this code in the .htaccess file for the directory where the images are served from, and you're all set. When a viewer loads the page at the remote site, they'll get a little surprise, instead of the original image.

Oh, and the next time you want to be talked out of a questionable idea, don't turn to Twitter.

I do not accept advertising, but the Amazon want you to know that some links may contain affiliate codes that dangle the promise of earning me a few pennies towards running this site (at no additional expense to you). Humbly, Gordon Meyer

Comments

Don M

A great non-techie way to do it is to just edit your existing post, make a copy of the original image and rename it and re-add it to your post. Then take the other image which was the hotlinked on with the original filename and make THAT into something else. I've done that a few times and it works simply - especially for someone on a shared account that might not have htaccess available or even know what it is.

dm

Gordon Meyer

Thanks for posting your technique, Don. That would have been far easier, but I didn't want to mess up other places where the article appears. Nor, track down everywhere it might be now (or in the future.) But if that's not an issue, your method would work great. Thanks again.

n/a

My images get stolen a lot. My trick is to substitute the image (via a similar rewrite) with a massive 8000-pixel-square transparent image. Their visitors see nothing, but it almost always completely busts the offender's layout.

Christina

I thought I was the only one who does this kind of stuff. For some reason, people hotlink to my images in MySpace comments. I have a really big image of an outhouse that I usually swap in when they do that. (Renaming the real image and changing the link.) Time consuming, yes, but fun to see the big outhouse cause a bit of layout havoc.

Neo

Good to see there's a way of overcoming this problem - I've seen it happen to a couple of friends of mine and will point them to this to see how they can get revenge!

The comments to this entry are closed.