|
I read this in an online document:
With all the pieces in place, here's how to disable hot linking of images on your site. Simply add the below code to your .htaccess file, and upload the file either to your root directory, or a particular subdirectory to localize the effect to just one section of your site:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]
Be sure to replace "mydomain.com" with your own. The above code causes a broken image
to be displayed when its hot linked.
In my particular condition, I have a network of sites that all need to be able to hotlink my images, but I want to protect the site from unwanted bandwidth stealing.. what do I do? Add additional lines like line #3 in the code?
Thanks!
|