Re: [mod-security-users] Apache Regular Expressions
Brought to you by:
victorhora,
zimmerletw
|
From: Tom A. <tan...@oa...> - 2005-02-08 13:05:54
|
On Tue, 2005-02-08 at 19:21, Rudi Starcevic wrote: > My URLs look like > > http://www.myserver.com/members.main > http://www.myserver.com/members.login > > I would like to match every request *not* containing the word login on > the end: > > This is what I have and it is not working how I would like. > > <Files ~ "/[^(login)]$/"> > or even > <Files ~ "/[^(login)]/"> That says to accept all characters except: l o g i n ( ) In rewrite rules and mod_sec, you negate a regex like this: "!(login)$". See the exclamation point in the front? In Perl, you would do this: "(?<!login)$" or "\.(?!login)$", which in the first case is a negative lookbehind on the end terminator, while the latter is a negative lookahead on the period. Try them... I don't know which if any of them work. Tom |