Stopping People from Using Your Images on their Web Pages. (Bandwidth Theft)
If you have some nice graphics on your site, you might notice that other
webmasters, usually newbies are having their readers pull the graphics
directly from your site. If your bandwith is metered, then you are paying
to support somebody else's site! Depending on how busy that other site
is, it can also place additional load on your server.
There is a fairly simple solution to this using Mod Rewrite. It is not
by any means perfect, but it should at least help. It depends on the
browser sending the referring page along with the image request. Since
most browsers do this, you will see results very quickly.
The idea to this is to save bandwidth and not be obnoxious about it.
One could return a nasty image file for off-site requests, but that
is not nice, and you are wasting your bandwidth! This set of rules
simply reports the image files as being "gone", creating a broken
image icon on the browser.
NOTE: In order to use this feature of the Apache Server, you must
make sure that the server was installed with the mod_rewrite.o
file. This is done by adding the line
to the Configuration file before compiling the server.
THIS SOUNDS PERFECT! HOW DO I DO IT?
Create a .htaccess file in the image directory you wish to protect.
This set of rules basically looks at the domain name provided by
the HTTP_REFERRER (from the beginning) without regard to upper or
lower case. (NC means No Case). The RewriteRule for gif and jpg
is to report the file as gone. Do not use F for forbidden
if you are using ErrorDocument redirects.
You can also do this to protect other types of files such as MIDI
files by changing the gif to mid. Of course, be sure
to change bignosebird.com to whatever your domain happens to be!
Note: This does not prevent people from right-clicking and
saving images on your pages.