Direct linking
Direct linking (hot linking) is bad. Its very bad when you own a domain or are hosted for free by someone who owns a domain. You pay for the bandwidth and direct linkers steal it. Its illegal to do so but still you will find many people doing it. You can not stop eac one of them by emailing their hosts. There is a better way of saving your bandiwdth : disabling direct linking from your site. Its easy to do so and you can also teach these theives a lesson by replacing the image they direct link with any image you want to.
Disable it
Open notepad and copy and paste the following code in it
| RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com.*$ [NC] RewriteRule \.(gif|jpg)$ - [F] |
Replace the image
If you want to show a particular image when someone direct links from your site, instead of the above code add the following code in the .htaccess file.
| RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com.*$ [NC] RewriteRule \.(gif|jpg)$ http://www.yoursite.com/hotlink.gif [R,L] |





