You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by António Rafael Paiva <a2...@alunos.det.ua.pt> on 2003/05/08 18:55:44 UTC
[users@httpd] Negate expression
Hi everyone!
How can i negate a extented regular expression?
What i need to do is to set an output filter to all files
except one.
Presently i tried:
<LocationMatch "/(!file).php">
SetOutputFilter LAYOUT .html .php
</LocationMatch>
Thanks in advance!
----------------------------------------------------
António Rafael C. Paiva
Electronics and Telecommunications Dep.
Aveiro University
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Negate expression
Posted by António Rafael Paiva <a2...@alunos.det.ua.pt>.
Thanks, it working now!
Rafael
On Thu, 8 May 2003 13:34:59 -0400
(=?ISO-8859-1?Q?Est_=28heure_d'=E9t=E9=29?=)
Joshua Slive <jo...@slive.ca> wrote:
>
> On Thu, 8 May 2003, António Rafael Paiva wrote:
> > <LocationMatch "/(!file).php">
> > SetOutputFilter LAYOUT .html .php
> > </LocationMatch>
>
> I'm not really a regex expert, but I would try something
> like this:
>
> <LocationMatch "(?<!file)\.[^.]+$">
>
> See http://www.perldoc.com/perl5.8.0/pod/perlre.html and
> http://www.pcre.org/ for information on apache's regex
> engine (PCRE).
>
> Normally I would suggest just using mod_rewrite for a
> task like this.
> But I don't believe mod_rewrite has the capability to
> set filters at the
> moment. Probably should be added.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache
> HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for
> more info.
> To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
> " from the digest:
> users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail:
> users-help@httpd.apache.org
>
----------------------------------------------------
António Rafael C. Paiva
Electronics and Telecommunications Dep.
Aveiro University
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Negate expression
Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 8 May 2003, António Rafael Paiva wrote:
> <LocationMatch "/(!file).php">
> SetOutputFilter LAYOUT .html .php
> </LocationMatch>
I'm not really a regex expert, but I would try something like this:
<LocationMatch "(?<!file)\.[^.]+$">
See http://www.perldoc.com/perl5.8.0/pod/perlre.html and
http://www.pcre.org/ for information on apache's regex engine (PCRE).
Normally I would suggest just using mod_rewrite for a task like this.
But I don't believe mod_rewrite has the capability to set filters at the
moment. Probably should be added.
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org