Forum Moderators: phranque
From what I know about the other site, I assume that they are linking to some image on my site and stealing my bandwidth. Unfortunately, my stats won't let me see what it is.
Now I thought I could simply disallow the other site to refer to my images via the .htaccess file.
<Limit GET>
order allow,deny
deny from evilsite.com
allow from all
</Limit>
Unfortunately, this doesn't work. Do I need to look up the other site and deny from the IP instead? Or is disallowing a referrer completely different from disallowing a user IP, so that I have to use a different approach?
Many thanks in advance! :)
If you don't have access to logfiles and have an idea of the possible images... change the file name and all your html referrals to the new name.
If you still get 2,000 referals/week from a particlar linked site (and none result in 404 errors, your assumption are probably wrong.
If you start get 2,000 404 errors with the same site your assumptions are more reasonable.
Then you can take action to limit this.
Actually I believe that the 2,000 referrals are already to a missing image and that I could probably ignore them, but I want to make sure. So that's why I want to go for the deny approach, it's simply the quickest.
Kevinpate, are you sure that using the IP instead will solve it (when using the domain name didn't work), or is it just maybe?
Deny from [IP #]
via .htaccess does work. I use it myself for certain IP's, primarily naughty bots.
I do both content and upkeep for a simple NFP site. We're the regional council for a USA national org. The site is not ecommerce. It's an info site that is 98%+ of benefit only to local council members.
Preserving existing bandwidth for local members is important. IP blocking is a well functioning part of this current preservation process.
SetEnvIf Referer ^$ local
SetEnvIfNoCase Referer ^(http://www\.¦http://)yourdomain\.com local<Files ~ "\.(gif¦jpg¦png¦css¦js)$">
order deny,allow
deny from all
allow from env=local
</Files>
Remember to replace the broken pipes (¦) with solid vertical pipes.