I've got a website. A few of the images on my small website are hotlinked in other websites. I must block them. I must allow some sites to hotlink my images (like some forums), when i make posts about my product in individuals forums. I've listing of sites that we regularly promote my items and I must permit them to hotlink my images. I must block other sites apart from my list.

I personally use hosting that is shared from hostgator btw.

I really hope it's clearly understandable.

Help. Thanks

You are able to put this code for your .htaccess file:

RewriteEngine On

RewriteCond % !^http://(www.)?yoursite.com [NC]

RewriteCond % !^$

RewriteCond % ^http://.*$

RewriteRule .(jpe?gpresenbmppng)$ /media/nohotlinks.png [L]

Please look at this article to learn more http://world wide web.yourhtmlsource.com/sitemanagement/bandwidththeft.html

Add the websites you need to allow as RewriteCondition towards the hotlinking rule of your liking, e.g. @YNhat's above.

For hotlinking from alloweddomain.com:

RewriteCond % !^http://(www.)?alloweddomain.com