Web Theft
Thursday April 10, 2008 - 22 months ago
Posted by James Ellis / Filed under Code, Random, Web
The web is pretty well open. You can view-source your way through most HTML, CSS and Javascript. That’s how most web workers learned their way around — by studying other websites. It’s one of the things we like about the web.
We certainly have no issue with anyone viewing our HTML, CSS, etc. But please don’t steal our design. And certainly don’t copy/paste our entire site HTML+CSS, change out the logo, post it behind your own domain and call it your own. Unfortunately, this happens on a somewhat regular basis.
Thanks to Mint’s newest unique referrers RSS feed, we can keep up with the latest URLs linking to the Athletics site. This feed lists the latest sites, blogs, link-lists, etc. directing traffic to our site.
And yesterday, upon clicking through to some of the latest referrers, we found this:
Web theft, in progress. Here we have someone in the process of customizing our site to make it their own. They have changed out the logo, changed some copy, but otherwise you can see they are still using our graphics and copy.
We couldn’t find an email address on the site, but after doing a whois on the domain we found that it’s registered to someone in Ankara, Turkey. We did find an email address registered with the domain, but it bounced back our kindly worded please-remove-our-property-from-your-site email.
Then, after taking a closer look, we noticed that they were still linking directly to our images. We realized we had the ability to send the folks at Yenioyun (and other web-offenders that we may not be aware of) a message.
Using a bit of mod_rewrite code, we were able to reroute all external requests for images on our server to an altogether different image.
Click through to http://yenioyun.org/ to see the result. And as I’m sure they will be changing their site shortly, here’s a screenshot for posterity. For the full effect, see the ani-gif we are using.
Of course this is nothing new. Web admins have long employed this sort of tactic for dealing with users leeching bandwidth (hotlinking images within their MySpace pages, message boards, porn sites, etc.) Most recently, I particularly enjoyed the John McCain MySpace incident.
Please, have the code:
With the help of this article and the mod_rewrite manual, we put the following mod_rewrite rule into an .htaccess file and placed it in our images directory.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} .(gif|jpe?g|png)$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !athleticsnyc.com [NC]
RewriteCond %{HTTP_REFERER} !bloglines.com [NC]
RewriteCond %{HTTP_REFERER} !google. [NC]
RewriteCond %{HTTP_REFERER} !search?q=cache [NC]
RewriteCond %{REQUEST_URI} !^/images/stop_stealing.gif
RewriteRule (.*) http://athleticsnyc.com/images/stop_stealing.gif?id=$1 [R,NC,L]
</IfModule>
The first line looks looks for all gif, jpeg and png files. The next few lines define the domains allowed to serve up our images (we want Google Reader and Bloglines users to be able to view our images). The next to last line disregards the rules if you’re requesting the replacement image (to keep from causing an infinite loop of redirects).
Questions? Comments? Contact James via email - .

