Welcome to WebmasterWorld Guest from 188.8.131.52
throws a 403 for UAs beginning with Mozilla/5.0space Escaping the space
throws a 500.
instead? That doesn't throw a 403, but I believe I had something very similar to that before which did nothing.
creates problems, or
if supposedly I need to escape ( and ) as well.
you're setting two environmental variables: one called (compatible) and then another called keep_out. And if you change it to \(compatible\) it's still the same thing, only now the literal backslashes are part of your variable name. Once you've departed from the RegEx--which happens as soon as you pass the first non-quoted space--everything reverts to being a literal character.
BrowserMatch ^Mozilla/5\.0 (compatible) keep_out
[edited by: JamesSC at 6:04 pm (utc) on Dec 17, 2018]
Please confirm or correct.Yup.
Finally, there's an alternative in all situations: the special character \s meaning "whitespace of any kind".
In mod_setenvif you would no longer require the quotation marks, since the string no longer contains a literal space. That's the advantage of doing it this way.