Posted by greenvelvet on 10/12/41 11:28
"greenvelvet" <spam@verizon.net> wrote in message
news:EFA0f.46$dl.27@trnddc08...
> 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~
Navigation:
[Reply to this message]
|