-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Terence,

On 6/30/2010 11:14 PM, Terence M. Bandoian wrote:
> Here's an alternative:
> 
>   RewriteCond %{HTTP_USER_AGENT} Firefox/
>   RewriteCond %{HTTP_USER_AGENT}
> !Firefox/(3\.0\.19|3\.5\.9|3\.6\.3)($|[^\.0-9])
>   RewriteRule .* /bad-browser.jsp [L]
> 
> And set the status in the JSP.

Well, I want this to work even in situations where the servlet container
isn't running.

> By the way, I'm a little confused by the character class in the last
> pair of alternatives of second condition. Did you want "not a '.' or
> digit" or "not (a '.' followed by a digit)"?

That pattern checks for Firefox patch levels for each major, supported
version. I look for (3.0|3.5|3.6) to take care of those versions, and
then I want to make sure that there are no trailing numbers. For
instance, 3.6.3 is okay (and needs to be updated to 3.6.6, I know) but
3.6.6.2 is /not/ okay. So, that last clause checks for end-of-input or
anything-that-isnt-a-dot-or-digit.

[.] always means "a period" and not "any character" like a bare "." would.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwtNmoACgkQ9CaO5/Lv0PDCaQCfeAxTMU0S/Bktp9ykdwf5CBw3
pjwAoIAtKs4FzZlrPGakvDq5ESGS7Utm
=2rqo
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to