Last updated 14 Feb 2008
Is someone else using your images?
By doing a rutine check of my stats, I found out that someone has been stealing some of my images with what is known as hotlink. As you can imagine, this could have increased bandwidth and consecuently, the monies I would have to pay for the excess. Fortunately, This isolated case (First time in three years) did not go on for long and I was able to stop it quickly.
This is how I do it and what I recommend you to do as soon as you can.
Create a simple text file with your notepad, textpad or whichever editor you are using. Name it ".htaccess" without the quotations marks (Note the full stop/dot before htaccess) and paste the following code on it. Change the DOMAIN section with the name of your domain (Do not add http or www) and upload the file to your images' folder on your server.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?YOUR-DOMAIN.com
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?YOUR-DOMAIN.com
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
The above will prevent other sites from displaying your images. In addition, you will also prevent people from directly accessing an image by typing in the URL in their browser.

