Forum Moderators: phranque

Message Too Old, No Replies

How to safely ban a UA containing commonality?

RewriteRule in .htaccess

         

keyplyr

7:26 am on Jul 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Someone using Netscape/PICgrabber hits once a week, requesting just a few files. It does not obey robots.txt so I'd like to ban it. Obviously I don't wish to ban other UA's named Netscape, so can I just leave off the anchor?

RewriteCond %{HTTP_USER_AGENT} PICgrabber [NC,OR]

Thanks

keyplyr

8:26 pm on Jul 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



anyone?

hakre

8:29 pm on Jul 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



this should do the job with ease:

RewriteCond %{HTTP_USER_AGENT} =Netscape/PICgrabber [NC,OR]

this will only block the specific one, other netscape can.

-hakre

keyplyr

8:48 pm on Jul 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Thanks,

What does the = do?

jdMorgan

9:01 pm on Jul 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



keyplyr,

The code you posted in msg#1 should work fine.

Jim