开发者

What's wrong w/ this htaccess rule?

I found out some guy was making an exact copy of my website so I wanted to replace the hotlinked images only on his website with a 'don't copy' image. But then some people messaged me saying they were seeing the 'don't copy' image on my website too. Is there anything wrong w/ the following?

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?开发者_如何学Goexample\.net/ [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://link/to/image.jpg [L]


The 'referer' is a client-filled item. Not everyone uses it, so not everyone will get your image.

Clients (browsers) can leave it blank (for better privacy), or one can fill it with your site as referer, to fake behaviour and still get your images. So you'll get some false negatives (as your users are reporting) and could get some false positives (people still leaching your images) too, although you'd have to be specially targeted for that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜