Ok, here is additional information. I really hope you don't ignore it :-) My working config (using phaethon.ch/static/ for testing purposes): AddEncoding gzip .gz RewriteEngine On RewriteLog "/tmp/rewrite.log" RewriteLogLevel 3 RewriteCond %{HTTP:Accept-Encoding} gzip RewriteRule ^/static/(.+).html$ /static/$1.html.gz [L,nosplit] gives: [phaethon.ch/sid#817517c][rid#818e454/initial] (2) init rewrite engine with requested uri /static/page.php?id=3.html [phaethon.ch/sid#817517c][rid#818e454/initial] (3) applying pattern '^/static/(.+).html$' to uri '/static/page.php?id=3.html' [phaethon.ch/sid#817517c][rid#818e454/initial] (2) rewrite /static/page.php?id=3.html -> /static/page.php?id=3.html.gz [phaethon.ch/sid#817517c][rid#818e454/initial] (2) local path result: /static/page.php?id=3.html.gz [phaethon.ch/sid#817517c][rid#818e454/initial] (2) prefixed with document_root to /home/project/web-site/phaethon/web-files/static/page.php?id=3.html.gz [phaethon.ch/sid#817517c][rid#818e454/initial] (1) go-ahead with /home/project/web-site/phaethon/web-files/static/page.php?id=3.html.gz [OK] your suggested config: RewriteRule ^/static/(.+).html$ /static/$1.html.gz [L,NE] gives (the nonworking result): [phaethon.ch/sid#81aae9c][rid#8187ec4/initial] (2) init rewrite engine with requested uri /static/page.php?id=4.html [phaethon.ch/sid#81aae9c][rid#8187ec4/initial] (3) applying pattern '^/static/(.+).html$' to uri '/static/page.php?id=4.html' [phaethon.ch/sid#81aae9c][rid#8187ec4/initial] (2) rewrite /static/page.php?id=4.html -> /static/page.php?id=4.html.gz [phaethon.ch/sid#81aae9c][rid#8187ec4/initial] (3) split uri=/static/page.php?id=4.html.gz -> uri=/static/page.php, args=id=4.html.gz [phaethon.ch/sid#81aae9c][rid#8187ec4/initial] (2) local path result: /static/page.php [phaethon.ch/sid#81aae9c][rid#8187ec4/initial] (2) prefixed with document_root to /home/project/web-site/phaethon/web-files/static/page.php [phaethon.ch/sid#81aae9c][rid#8187ec4/initial] (1) go-ahead with /home/project/web-site/phaethon/web-files/static/page.php [OK] or did you mean (which works neither): RewriteRule ^/static/(.+)\?(.+).html$ /static/$1\%3F$2.html.gz [L,NE] gives: [phaethon.ch/sid#81ff69c][rid#816dd24/initial] (2) init rewrite engine with requested uri /static/page.php?id=8.html [phaethon.ch/sid#81ff69c][rid#816dd24/initial] (3) applying pattern '^/static/(.+)\?(.+).html$' to uri '/static/page.php?id=8.html' [phaethon.ch/sid#81ff69c][rid#816dd24/initial] (2) rewrite /static/page.php?id=8.html -> /static/page.php%3Fid=8.html.gz [phaethon.ch/sid#81ff69c][rid#816dd24/initial] (2) local path result: /static/page.php%3Fid=8.html.gz [phaethon.ch/sid#81ff69c][rid#816dd24/initial] (2) prefixed with document_root to /home/project/web-site/phaethon/web-files/static/page.php%3Fid=8.html.gz [phaethon.ch/sid#81ff69c][rid#816dd24/initial] (1) go-ahead with /home/project/web-site/phaethon/web-files/static/page.php%3Fid=8.html.gz [OK] Thank you Jade Nicoletti On Mon, Oct 27, 2003 at 11:48:12AM -0600, Debian Bug Tracking System wrote: > This is an automatic notification regarding your Bug report > #204508: apache: mod_rewrite can't rewrite to filenames containing a '?', > which was filed against the apache package. > > It has been closed by one of the developers, namely > Matthew Wilcox <willy@debian.org>. > > Their explanation is attached below. If this explanation is > unsatisfactory and you have not received a better one in a separate > message then please contact the developer, by replying to this email. > > Debian bug tracking system administrator > (administrator, Debian Bugs database) > > Received: (at 204508-done) by bugs.debian.org; 27 Oct 2003 17:43:42 +0000 > >From willy@www.linux.org.uk Mon Oct 27 11:43:41 2003 > Return-path: <willy@www.linux.org.uk> > Received: from parcelfarce.linux.theplanet.co.uk (www.linux.org.uk) [195.92.249.252] > by master.debian.org with esmtp (Exim 3.35 1 (Debian)) > id 1AEBP2-0004RS-00; Mon, 27 Oct 2003 11:43:41 -0600 > Received: from willy by www.linux.org.uk with local (Exim 4.22) > id 1AEBP2-0005hF-FN > for 204508-done@bugs.debian.org; Mon, 27 Oct 2003 17:43:40 +0000 > Date: Mon, 27 Oct 2003 17:43:40 +0000 > From: Matthew Wilcox <willy@debian.org> > To: 204508-done@bugs.debian.org > Subject: Upstream says this is not a bug > Message-ID: <20031027174340.GA5172@parcelfarce.linux.theplanet.co.uk> > Mime-Version: 1.0 > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > User-Agent: Mutt/1.4.1i > Sender: <willy@www.linux.org.uk> > Delivered-To: 204508-done@bugs.debian.org > X-Spam-Status: No, hits=1.0 required=4.0 > tests=BAYES_70 > version=2.53-bugs.debian.org_2003_10_21 > X-Spam-Level: * > X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_10_21 (1.174.2.15-2003-03-30-exp) > > > I am therefore closing this bug. > > ------- Additional Comments From nd@perlig.de 2003-10-27 17:25 ------- > Thom May and /me talked about this one a while ago on IRC and came to the > conclusion that there's no issue to fix. One can easily use %3F in conclusion > with NE option to treat the question mark as part of the name. That is what NE > is intended for -- and how URIs *have to* be written. > > -- > "It's not Hollywood. War is real, war is primarily not about defeat or > victory, it is about death. I've seen thousands and thousands of dead bodies. > Do you think I want to have an academic debate on this subject?" -- Robert Fisk -- =============================================================================== Jade Nicoletti Nicoletti Net Services Tel. 01 240 4774 Geschäftsleitung Postfach 2519 System-Administration 8021 Zürich ===============================================================================
Attachment:
signature.asc
Description: Digital signature