Received: (qmail 39576 invoked by uid 65534); 10 Feb 2000 12:53:06 -0000 Message-Id: <20000210125306.39575.qmail@locus.apache.org> Date: 10 Feb 2000 12:53:06 -0000 From: Howard Jones Reply-To: howie@thingy.com To: submit@bugz.apache.org Subject: "On-the-fly Content-Regeneration" will not work as described. X-Send-Pr-Version: 3.110 >Number: 5733 >Category: mod_rewrite >Synopsis: "On-the-fly Content-Regeneration" will not work as described. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: apache >Arrival-Date: Thu Feb 10 05:00:01 PST 2000 >Closed-Date: Sun Sep 17 22:41:21 PDT 2000 >Last-Modified: Sun Sep 17 22:41:21 PDT 2000 >Originator: howie@thingy.com >Release: 1.3.11 >Organization: >Environment: Redhat Linux 6.1 fresh install (kernel 2.2.12) >Description: "RewriteCond %{REQUEST_FILENAME} !-s RewriteCond ^page\.html$ page.cgi [T=application/x-httpd-cgi,L]" 1) The second RewriteCond should be a RewriteRule. 2) the -s and -f checks seem to just do a stat() on what they are given, anyway, so unless your documentroot is / then the file will never exist? 3) Under what conditions *would* this work? :) >How-To-Repeat: http://www.apache.org.uk/docs/misc/rewriteguide.html >Fix: Subst RewriteCond for RewriteRule in second line. Add note, or additional info into file-test section to clarify if they check URIs or files (this example implies URIs, the docs says 'file'). >Release-Note: >Audit-Trail: From: "Ralf S. Engelschall" To: apbugs@apache.org Cc: Subject: Re: mod_rewrite/5733: "On-the-fly Content-Regeneration" will not work as described. Date: Thu, 10 Feb 2000 17:26:50 +0100 In article <20000210125306.39575.qmail@locus.apache.org> you wrote: >>Synopsis: "On-the-fly Content-Regeneration" will not work as described. > [...] > "RewriteCond %{REQUEST_FILENAME} !-s > RewriteCond ^page\.html$ page.cgi [T=application/x-httpd-cgi,L]" > > 1) The second RewriteCond should be a RewriteRule. > 2) the -s and -f checks seem to just do a stat() on what they are given, anyway, so unless your documentroot is / then the file will never exist? > 3) Under what conditions *would* this work? :) >>How-To-Repeat: > http://www.apache.org.uk/docs/misc/rewriteguide.html >>Fix: > Subst RewriteCond for RewriteRule in second line. Done. > Add note, or additional info into file-test section to clarify if they check > URIs or files (this example implies URIs, the docs says 'file'). There is the following note: | ATTENTION: Depending on your server-configuration it can be necessary to | slightly change the examples for your situation, e.g. adding the [PT] flag | when additionally using mod_alias and mod_userdir, etc. Or rewriting a ruleset | to fit in .htaccess context instead of per-server context. Always try | to understand what a particular ruleset really does before you use it. It | avoid problems. Here the ruleset was originally used in .htaccess context and there is should work as written down (although I've not tried it since two years). Ralf S. Engelschall rse@engelschall.com www.engelschall.com State-Changed-From-To: open-closed State-Changed-By: slive State-Changed-When: Sun Sep 17 22:41:21 PDT 2000 State-Changed-Why: Fixed by RSE. >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]