selective hotlink prevention

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Is it possible to use .htaccess to prevent hotlinking from a particular
website only?

There's one website that repeatedly hotlinks to my images; in the past 3
days it's gotten 541 hits from their websitek (Imagine what that number will
be by end of month.)

I'd like to block that site (but not all sites) from linking to my images.
Is there a way?



Re: selective hotlink prevention

Quoted text here. Click to load it

to follow up:

I found this code online & put it in my .htaccess file. But it doesn't work;
it also blocks some images from my own site!
What am I doing wrong?

RewriteEngine On
RewriteCond % ^http://(www\.)?*$ [NC,OR]
RewriteRule \.(gif|jpg)$[R,L]

Also, is there a way that folks can just get an error rather than a 404 or a
redirect to an alternate image?


Site Timeline