Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- RegEx help with rewrite


g1smd - 9:28 pm on Sep 30, 2011 (gmt 0)


This would work,

^(Moz|Mozilla|Mozilla/5\.0)$

but why force the parser to search for "Moz" in the input string three times.

Once you found it the first time, look for more stuff on the end, or not:

^(Moz(illa(/5\.0)?)?)$

There's no reason why this should fail, unless there's more characters on the end of the original input string.


This would also match
^Moz[^\ ]*$ but would also match all sorts of other stuff.


Thread source:: http://www.webmasterworld.com/apache/4369096.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com