 |
 |
Apache Config, Blockign Agents?
|
 |
|
 |
|
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status:
Offline
|
|
I know that in the apache config, in a drectory container of a virtual host, you can place the following code to block specific people, if they, for instance, like to load your web site over and ever even, hundreds of times a day.
Code:
deny from suomen2g.fi dnainternet.fi dsl.pltn13.pacbell.net
Is there a way I can optionally block users quickly and "lite on the processor" using basically the same method only matching the agent not the host? I run whatsmyip.org and people like to make bots that load my site every 5 or 10 minutes, and create hundreds of extra usless hits a day. Lots of these programs use thier own agent type, so I could easily block them this way without blockign everyone on thier whole ISP, or just thier specific IP and when they reboot have them start all over again.
(Last edited by l008com; May 9, 2003 at 12:32 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Oct 2000
Status:
Offline
|
|
Originally posted by l008com:
Is there a way I can optionally block users quickly and "lite on the processor" using basically the same method only matching the agent not the host?
mod_rewrite can do what you're looking for. have a look at the section called "Blocking of Robots" on this page:
http://httpd.apache.org/docs/misc/rewriteguide.html
(obviously this requires you to enable mod_rewrite for your virtual host, but i don't think it's a huge drain on resources)
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status:
Offline
|
|
wow those rules are very complicated, i can't even understand them when i read them, its just like perl, it looks like someone just hit the options key and leaned on thier keyboard :-P
Is there an easier way to do it, something using deny, like 'deny agent wwwlib' or something
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Oct 2000
Status:
Offline
|
|
Originally posted by l008com:
wow those rules are very complicated, i can't even understand them when i read them, its just like perl, it looks like someone just hit the options key and leaned on thier keyboard :-P
Is there an easier way to do it, something using deny, like 'deny agent wwwlib' or something
okay, i can understand that it's a little complicated at first glance, but it's really not that bad...
have a look here for some practical examples:
http://diveintomark.org/archives/200...o_to_hell.html
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status:
Offline
|
|
Actually I found a way you can jsut use evironmental variables with the deny thing
thats much easier and faster, but thanks anyway
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|