selective hotlink prevention

G

greenvelvet

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?

thanks!

~velvet~
 
G

greenvelvet

greenvelvet said:
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?

thanks!

~velvet~

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_REFERER} ^http://(www\.)?badsite.com.*$ [NC,OR]
RewriteRule \.(gif|jpg)$ http://www.mywebsite.com/images/hotlink.gif [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?

thanks!
~velvet~
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top