httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf Glauberman" <rglauber...@michaeli-gymnasium.de>
Subject Re: [users@httpd] FilesMatch match all EXCEPT one file
Date Tue, 23 Nov 2004 19:21:20 GMT
never worked with perl or filesmatch, but perhaps it is possible to set the 
footervariable for all files and then set it to '' for the one file.
just an idea, don't know if this is possible.

----- Original Message ----- 
From: "James Taylor" <jtx@hatesville.com>
To: <users@httpd.apache.org>
Sent: Tuesday, November 23, 2004 6:28 PM
Subject: Re: [users@httpd] FilesMatch match all EXCEPT one file


> Joshua Slive wrote:
>> On Mon, 22 Nov 2004 23:49:04 -0800, James Taylor <jtx@hatesville.com> 
>> wrote:
>>
>>>Hi, quick and easy question I'm hoping:
>>>
>>>In my <FilesMatch> directive, I need it to match all files EXCEPT one
>>>particular file, which let's say for instance is called header.html.
>>>There could be a million other files in that directory with random
>>>names, I just don't want header.html to be matched.  Maybe my regex
>>>isn't what it used to be now that I'm spoiled with !~ and !preg_match, 
>>>but:
>>>
>>><FilesMatch "[^header]">  doesn't seem to work whatsoever, no clue what
>>>I should be doing.  There's no <!FilesMatch> unfortuntately,
>>>and I'm starting to pull my hair out here.
>>>
>>>Using apache 1.3.9 under solaris currently I believe. Thanks for any 
>>>help!
>>
>>
>> Ouch.  That version is ancient.
>>
>> I don't believe that this can be done under apache 1.3.  Under 2.0,
>> you get the more powerful PCRE regex engine which can do negative
>> lookaheads, so you may be able to do it.
>>
>> Alternatively, tell us exactly what you are trying to accomplish and
>> we may be able to give alternative implimentation suggestions.
>>
>> Joshua.
>>
>
> Oh, I'm sorry, I'm running 1.3.29 - Been a while since I've asked apache 
> questions :)
>
> Anyway, we're not at 2 yet because the older custom mod_perl modules we 
> have aren't compatible with apache 2 yet.  That, and solaris is picky.
>
> Basically, what I'm doing is I have Apache::Sandwich adding a footer to 
> all files in specific directories.  Only thing is, the sites are using 
> frames, and I don't want to add the footer to the header frame.  So let's 
> say I have:
>
> <Directory "/web/htdocs/DIR10">
>    AuthType Apache::LinkHandler
>    PerlSetVar AuthClass D10
>    PerlAuthenHandler Apache::LinkHandler->authenticate
>    PerlAuthenzHandler Apache::LinkHandler->authorize
>    require valid-user
>    <FilesMatch "EVERYTHING BUT HEADER.HTML">
>       SetHandler perl-script
>       PerlHandler Apache::Sandwich
>       PerlSetVar FOOTER /web/htdocs/footer.html
>    </FilesMatch>
> </Directory>
>
> And then there are maybe another 15 directories like this one that need 
> the same thing.
>
> ---------------------------------------------------------------------
> 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
> 


---------------------------------------------------------------------
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


Mime
View raw message