Forum Moderators: phranque

Message Too Old, No Replies

Deny access by computer type

         

helleborine

11:19 am on Apr 20, 2005 (gmt 0)

10+ Year Member



Can I deny access to this computer configuration:

Macintosh; U; PPC; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02

He's a troll on my forum that uses anonymous proxies. I'm growing tired of the proxy chase and deny routine, and I'd like to deny him access on the above criteria, which is a fairly unique combination.

Span

11:30 am on Apr 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Except for the Mozilla/5.0 part that is the latest version of Netscape for MacOs 9. This is the complete string:

Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02

Is the rewrite I posted in your other post [webmasterworld.com] not working?

helleborine

11:53 am on Apr 20, 2005 (gmt 0)

10+ Year Member



Yes, thanks again. It works for a referring site... can it work with a specific computer configuration?

If so, do I have to place backslashes in front of the periods? Are there any other special characters in the string requiring special treatment?

Span

12:27 pm on Apr 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That is not a computer configuration, it is the user agent string from NN7.02 for an older Mac. If you put it in your .htaccess you will send every user with that browser to your 403 page.
Tested with my own copy of Netscape 7.02.

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^Mozilla\/5.0\ \(Macintosh;\ U;\ PPC;\ en-US;\ rv:1.0.2\)\ Gecko\/20030208\ Netscape\/7.02 [NC]
RewriteRule .* - [F]

helleborine

12:37 pm on Apr 20, 2005 (gmt 0)

10+ Year Member



Thanks! You're a godsend! ;-)