You are here: Re: selective hotlink prevention « HTML « IT news, forums, messages
Re: selective hotlink prevention

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация