prevent hotlinking
am 31.05.2007 02:46:27 von abracad_1999
I want to prevent other sites hotlinking to images on my site which
appears as the urls:
japan.twinisles.com
japandesu.com
I have added the following lines to.htacces
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?twinisles\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?japandesu\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?japan.twinisles\.com/ [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
However when I test it on sites such as http://www.free-webhosts.com/hotlinking-checker.php
the images still appear.
What am I doing wrong?
Re: prevent hotlinking
am 31.05.2007 17:43:22 von sig
On 30 May 2007 17:46:27 -0700 said
> I want to prevent other sites hotlinking to images on my site which
> appears as the urls:
> japan.twinisles.com
> japandesu.com
>
> I have added the following lines to.htacces
> RewriteEngine On
> RewriteCond %{HTTP_REFERER} ^http://(.+\.)?twinisles\.com/ [NC,OR]
> RewriteCond %{HTTP_REFERER} ^http://(.+\.)?japandesu\.com/ [NC,OR]
> RewriteCond %{HTTP_REFERER} ^http://(.+\.)?japan.twinisles\.com/ [NC]
> RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
>
>
> However when I test it on sites such as http://www.free-webhosts.com/hotlinking-checker.php
> the images still appear.
>
>
> What am I doing wrong?
You are permitting _only_ hotlinks. You need to negate the conditions (put
! before the pattern) and remove the ORs.
Sig
--
http://koiclubsandiego.org/comment/?r=8
dee1d312e3b3a21a1e08bf2aea1273bb
Re: prevent hotlinking
am 01.06.2007 00:08:09 von colin.mckinnon
On 31 May, 01:46, abracad_1...@yahoo.com wrote:
> I want to prevent other sites hotlinking to images on my site which
> appears as the urls:
> japan.twinisles.com
> japandesu.com
>
> I have added the following lines to.htacces
> RewriteEngine On
> RewriteCond %{HTTP_REFERER} ^http://(.+\.)?twinisles\.com/ [NC,OR]
> RewriteCond %{HTTP_REFERER} ^http://(.+\.)?japandesu\.com/ [NC,OR]
> RewriteCond %{HTTP_REFERER} ^http://(.+\.)?japan.twinisles\.com/ [NC]
> RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
>
> However when I test it on sites such ashttp://www.free-webhosts.com/hotlinking-checker.php
> the images still appear.
>
> What am I doing wrong?
Since the site you mention is specifically designed to demonstrate
leeching, the people who developed it have probably planned for such a
trivial prophylaxis. Also, if you're serious about protecting your
site you should learn how to capture protcol level wiretaps and how to
understand them.
C.