Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 19205 invoked from network); 18 Jun 2004 09:49:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 18 Jun 2004 09:49:32 -0000 Received: (qmail 28195 invoked by uid 500); 18 Jun 2004 09:49:43 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 28176 invoked by uid 500); 18 Jun 2004 09:49:42 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 28160 invoked by uid 99); 18 Jun 2004 09:49:42 -0000 Received: from [213.80.46.101] (HELO mail03.profundis.se) (213.80.46.101) by apache.org (qpsmtpd/0.27.1) with ESMTP; Fri, 18 Jun 2004 02:49:42 -0700 Received: from profundis-01.profundis.se ([213.80.46.103] helo=PROFUNDIS01) by mail03.profundis.se with smtp (Exim 4.32) id HZI0LG-0005RG-DL for users@httpd.apache.org; Fri, 18 Jun 2004 11:48:52 +0200 Message-ID: <03ef01c45519$768fb790$652e50d5@profundis.se> Reply-To: "Robert Andersson" From: "Robert Andersson" To: References: Date: Fri, 18 Jun 2004 11:48:50 +0200 Organization: Profundis MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Checked: Checked Subject: Re: [users@httpd] addhandler changes between Apache 1.3 and 2.0 X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Alois Treindl wrote: > # in Apache 2.0, the Addhandler directive does not work to give .htm > # requests to xa.cgi if the requested file is missing. > # for this case, we use this extra redirect > RewriteCond /www/docs/%{REQUEST_FILENAME} \.htm$ > RewriteCond /www/docs/%{REQUEST_FILENAME} !-f > RewriteRule /(.*) /cgi/xa.cgi/$1 [L,R] > > If I leave the [R] flag out, the redirect is done to > /www/docs/cgi/xa.cgi > which of course does not work, as the /cgi/ directory is not within > the documents directory /www/docs As long as you have the [R] flag, the user *will* se the rewritten URI, so you'll need a way to get rid of it. I have not utilized mod_rewrite in that way, but the docs suggests that the substitution can be a real filesystem path, so you might be able to just do: RewriteRule /(.*) /path/to/cgi/xa.cgi/$1 [L] I'm asuming /cgi is an alias of some sort, so as indicated by the docs: "'passthrough|PT' (pass through to next handler) This flag forces the rewriting engine to set the uri field of the internal request_rec structure to the value of the filename field. This flag is just a hack to be able to post-process the output of RewriteRule directives by Alias, ScriptAlias, Redirect, etc. directives from other URI-to-filename translators. [...]" Replacing [R] with [PT] might do the trick also, and seems preferable. Regards, Robert Andersson --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See 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