Re[2]: [Mod_gzip] Need some exclude syntax help

Walter Hop mod_gzip@lists.over.net
Tue, 9 Dec 2003 19:09:00 +0100


[in reply to Michael.Schroepl@telekurs.de, 9-12-2003]

>> I have been trying to have mod_gzip include say "file.xml",
>> but exclude "file.xml?printfriendly", but I haven't had any luck.
>>
>> Does anyone have any ideas on how to to that?
>
> This might become a tricky thing.

Since I had a problem with MSIE's XML download component and gzip
encoding, I have renamed the affected files to .phpx and added an exclude
for .phpx:

    mod_gzip_item_include         file       \.php$
    mod_gzip_item_exclude         file       \.phpx$

Ofcourse I have also let Apache know to handle .phpx files properly.

    AddType application/x-httpd-php .phpx

This may not be interesting for your situation but it could be a nice tip
anyway.

Also, maybe you could try passing the arguments not as QUERY_STRING, but
as PATH_INFO, as in: http://host/file.xml/printfriendly/; this would
require some patching in the scripts but I think in such a situation the
whole script name should be available to do funky regexps on.

cheers,
walter