Forum Moderators: phranque

Message Too Old, No Replies

BrowserMatch for exactly "Mozilla" string, no version

Block a script from using "Mozilla" as UA

         

Thanasus

4:21 pm on Nov 30, 2003 (gmt 0)

10+ Year Member



I have a scmuck that just crawled several sites of mine using a bot. The bot spoofs a user agent of "Mozilla", just that exact string. I am going to ban it using the BrowserMatch directive.

BrowserMatch "^Mozilla$" I believe should work but I wanted to get a second opinion before I update my live server which has dozens of unique visitors every minute. Don't want to accidentally ban all Mozilla UAs

jdMorgan

6:03 pm on Nov 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanasus,

That user-agent regex looks good to me, but since you're using mod_setenvif to set a variable for later use by mod_access, also make darn sure you check your Order and Deny from directives against the documentation, too!


BrowserMatch "^Mozilla$" Getout
#
<Files *>
Order Deny,Allow
Deny from env=Getout
Allow from all
</Files>

Jim