Archive for the ‘Htaccess’ Category

Image protection with .htaccess

Wednesday, January 4th, 2006

How to stop people stealing your images/bandwidth remotely:

(1) Make an image called dontsteal.gif and place it in a directory below the directory in which you are going to put the .htaccess file.

(2) Open notepad and copy this code … no hard carriage returns between lines.

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://whateverdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.whateverdomain.com/.*$ [NC]
RewriteRule .*\.(gif|GIF|jpg|JPG|zip|ZIP|png|PNG|swf|SWF)$ http://www.whateverdomain.com/dontsteal.gif [R,L]

(3) Change whateverdomain.com to whatever your domain is called.

(4) This code works with apache servers with mod_rewrite.

"If a country develops an economic system that is based on how to pay for the war, and if the amounts of fixed capital investment that are apparent are tied up in armaments, and if that country is a major exporter of arms, and its industrial fabric is dependent on them, then it would be in that country's interests to ensure that it always had a market. It is not an exaggeration to say that it is clearly in the interests of the world's leading arms exporters to make sure that there is always a war going on somewhere."

- Marilyn Waring
Go to the Top of the Page
Search this Site
Sibagraphics
ABN40098165406 / QLD BN17649330
P.O. Box 259, Pomona, Qld Australia 4568
Ph: +61 (0)7 5485 2085
Mob: +61 (0)412 665 189

Visitor locations

Valid XHTML 1.0 / Valid CSS Copyright | Privacy | Disclaimer
Copyright © 1998 - 2008 Sibagraphics
Page last modified October 11, 2007.