Your Daily Source for Apache News and Information  
Breaking News Preferences Contribute Triggers Link Us Search About
evolt.org: Using Apache to stop bad robots
(Sep 20th, 18:43:52 )

"We're going to use the environment variable features found in Apache to fight our battle, specifically the 'SetEnv' directive. This is a simple alternative to mod_rewrite and almost everything needed is compiled in to the webserver by default. In this example, we're editing the httpd.conf file, but you should be able to use it in an .htaccess file as well."

"... The 'SetEnvIfNoCase' simply sets an enviornment (SetEnv) variable called 'bad_bot' If (SetEnvIf) the 'User-Agent' string contains Wget, EmailSiphon, or EmailWolf, regardless of case (SetEnvIfNoCase). In english, anytime a browser with a name containing 'wget, emailsiphon, or emailwolf' accesses our website, we set a variable called 'bad_bot'. We'd also want to add a line for the User-Agent string of any other Spidert we want to deny."

Complete Story

Related Stories:
Apache Guide: For More Information ...(Feb 15, 2001)
Apache Guide: Spiders and Robots(Nov 21, 2000)
Apache Guide: Logging with Apache--Understanding Your access_log(Aug 21, 2000)
Securing Your Web Pages with Apache(Jun 29, 2000)


Printed from Apache Today (https://apachetoday.com).
https://apachetoday.com//news_story.php3?ltsn=2001-09-20-003-06-PS-CY-AD

About Triggers Media Kit Security Triggers Login


All times are recorded in UTC.
Linux is a trademark of Linus Torvalds.
Powered by Linux 2.4, Apache 1.3, and PHP 4
Copyright 2002 INT Media Group, Incorporated All Rights Reserved.
Legal Notices,  Licensing, Reprints, & Permissions,  Privacy Policy.
http://www.internet.com/