Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- A Close to perfect .htaccess ban list - Part 2


nancyb - 11:54 pm on Jun 12, 2003 (gmt 0)


newbie here, flailing about ...

I've been reading these threads, the SESpider Ident and the Perl forums for about a month, on and off, whenever I can find the time and it seems the more I learn the more confuseder I get :)

I want to set up a spider trap but thought it better to get .htaccess working right first since the trap will be another new learning phase.

This is small sample of my .htaccess. Most of what I have does the trick, but not for the six below. I searched for "Indy" and "Microsoft URL Control" and have tried every variation I found in the 'close to perfect' threads, but probably not sequentially which may be the reason they don't work. Would these be correct without the preceeding "^"? And, should Indy Library be changed to "Indy Library" inside qoutes and without escaping the space?

RewriteEngine On
RewriteCond %{REMOTE_ADDR} "^63\.148\.99\.2(2[4-9]¦[3-4][0-9]¦5[0-5])$" [OR]
#lots of UA's......
RewriteCond %{HTTP_USER_AGENT} ^ia_archiver [OR]
RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^LinkWalker [OR]
RewriteCond %{HTTP_USER_AGENT} ^Microsoft\ URL\ Control [OR]
RewriteCond %{HTTP_USER_AGENT} ^webcollage [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus [OR]
RewriteRule!^403.htm$ - [F]
Deny from 128.242.197.101
RedirectPermanent /flename.htm [mydomain.com...]

One more question, is the 'Deny from' the correct syntax to deny an IP? My hosting service said I didn't need anything above or below it.

Thanks


Thread source:: http://www.webmasterworld.com/apache/205.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com