Re: [mod-security-users] Apache Regular Expressions
Brought to you by:
victorhora,
zimmerletw
|
From: Tom A. <tan...@oa...> - 2005-02-08 15:20:56
|
----- Original Message ----- From: "Ivan Ristic" <iv...@we...> >> In Perl, you >> would do this: "(?<!login)$" > > The above works in Apache 2.0.52 (which has a different regex engine > from Apache 1.x BTW). I used it with <FilesMatch>: > > <FilesMatch "(?<!login)$"> > Order Allow,Deny > Deny from all > </FilesMatch> > > The second suggestion does not work for me. Indeed, it probably shouldn't with the end terminator included, since the period would have to be the last character. Trying <FilesMatch "\.(?!login)"> would probably do it though, as it would match any file that has a period not followed by "login". I have to imagine that if Apache recognizes a negative lookbehind, it would recognize a negative lookahead, since the latter is older and more established. In any event, if the first suggestion worked, then that should be sufficient for finding all files that do not end with "login". I'm glad to hear that Apache's regex engine is so advanced. Tom |