Re: [mod-security-users] Apache Regular Expressions
Brought to you by:
victorhora,
zimmerletw
|
From: Fred S. <fr...@me...> - 2005-02-08 12:42:27
|
Hi, As far as I know, you can't do this in apache. The way the Files or FilesMatch directive works, its logic won't support a logical not (its matching mechanism only gets triggered by a match). Modsecurity does support the "!" as the inversion operator, so it would be fairly easy to construct <Location /foo> SecFilterSelective REQUEST_URI !members </Location> I've only been using modsec for a few days now, so if there's a way to do it more elegantly, feel free to correct me. On Tue, 8 Feb 2005, Rudi Starcevic wrote: > Hello, > > I"m trying to write a Regular expression without any joy, so I thought I'd > ask for some help. > > At this stage the first thing I want to do is match a request using the > <Files> Directive. > > 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)]/"> > > I'm want to do this so I can sort my Folders for a client with some weird > setup. > > Can you see where I am going wrong ? > Many thanks > Best Regards > Rudi > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > mod-security-users mailing list > mod...@li... > https://lists.sourceforge.net/lists/listinfo/mod-security-users > -- Fred Stutzman Desk: 962-5646 Cell: 260-8508 www.ibiblio.org |