For When You Can't Have The Real Thing
[ start | index | login ]
start > Apache > Image Access Limitation

Image Access Limitation

Created by dave. Last edited by dave, 17 years and 179 days ago. Viewed 2,867 times. #3
[diff] [history] [edit] [rdf]
labels
attachments

Limiting Bandwidth Theft

I've noticed several sites are ending up using one of my images in their websites. Now I really have no problem with people copying them and hosting them on their own systems (since that is basically what I do) however I am not interested in paying freight for other people's websites to look pretty.

So I have protected my img directory with a .htaccess file containing this:

SetEnvIfNoCase Referer "^>>http://xdroop.com/" local_ref=1
SetEnvIfNoCase Referer "^>>http://wiki.xdroop.com/" local_ref=1
SetEnvIfNoCase Referer "^>>http://wordpress.xdroop.com/" local_ref=1
<FilesMatch ".(gif|jpg|JPG|png)">
  Order Allow,Deny
  Allow from env=local_ref
</FilesMatch>

It means that I will need to put "public" pictures, as in pictures I use when commenting on other sites, in a different directory so that they can be seen, but it should stop the rampant use of the Impreza and donkey images that I swiped from elsewhere.

The better solution is the Rewrite condition, but the error_log on my hosted service says Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden. Bummer.

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt