Forum Moderators: phranque

Message Too Old, No Replies

How to close connection instead of returning 403

Returning 403 or any other info to spammers, bots, etc. costs us bandwidth.

         

John Carpenter

9:47 pm on Jun 18, 2005 (gmt 0)

10+ Year Member



We have been trying to cut down our bandwidth usage by disallowing access for many spammers and malevolent bots. We are currently doing it via .htaccess and respond with the "403 Forbidden" code.

However, this still costs us some bandwidth. What we would like to do is close the connection without even responding to any bad's visitor request. Bad visitor is detected by examining the user, and/or referrer, or requested URI (never by examining the IP address).

Is this possible to do on Apache 1.3.27 (running on Red Hat)? Thanks in advance.

jdMorgan

10:59 pm on Jun 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you want a zero-bandwidth solution, you'll need to block them at the firewall.

Otherwise, you can internally rewrite the request to a special subdirectory which contains its own unique blank 403 ErrorDocument, and declare that ErrorDocument in .htaccess in that subdirectory.

I'm not aware of how to suppress the response at the server level. There may be a way to do it; maybe someone who's experimented with this will post.

Jim