Return-Path: X-Original-To: apmail-httpd-docs-archive@www.apache.org Delivered-To: apmail-httpd-docs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CFB1F968D for ; Fri, 13 Apr 2012 03:52:07 +0000 (UTC) Received: (qmail 459 invoked by uid 500); 13 Apr 2012 03:52:07 -0000 Delivered-To: apmail-httpd-docs-archive@httpd.apache.org Received: (qmail 303 invoked by uid 500); 13 Apr 2012 03:52:07 -0000 Mailing-List: contact docs-help@httpd.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: docs@httpd.apache.org List-Id: Delivered-To: mailing list docs@httpd.apache.org Received: (qmail 285 invoked by uid 99); 13 Apr 2012 03:52:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 03:52:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 03:52:03 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id C8C5C39C8; Fri, 13 Apr 2012 03:51:42 +0000 (UTC) From: bugzilla@apache.org To: docs@httpd.apache.org Subject: DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution Date: Fri, 13 Apr 2012 03:51:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Apache httpd-2 X-Bugzilla-Component: Documentation X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: chealer@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: docs@httpd.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 https://issues.apache.org/bugzilla/show_bug.cgi?id=52000 Filipus Klutiero changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW --- Comment #11 from Filipus Klutiero 2012-04-13 03:51:23 UTC --- Well, this is abusing this report, but if we're at it... I don't think it is correct to say On the first RewriteRule, it is matched against the (%-decoded) URL-path (or file-path, depending on the context) of the request. In per-directory context, we don't necessarily have a file-path if I understand correctly. file-path is defined this way: The path to a file in the local file-system beginning with the root directory as in /usr/local/apache/htdocs/path/to/file.html. Unless otherwise specified, a file-path which does not begin with a slash will be treated as relative to the ServerRoot. Suppose we get a request for http://localhost/article/7, which we want to be served by /usr/local/apache/htdocs/articles.php. We define a per-directory rewrite rule in /usr/local/apache/htdocs/.htaccess. That rule will match against "article/7". Yet, there is no /usr/local/apache/article/7. In fact, there is no "7" file anywhere. Also, http://httpd.apache.org/docs/trunk/en/rewrite/intro.html#rewriterule contains: The Pattern is always a regular expression matched against the URL-Path of the incoming request (the part after the hostname but before any question mark indicating the beginning of a query string). This is the same problem as we had in RewriteRule's documentation before the previous commit. I suggest: The Pattern is a regular expression. It is initially matched against the URL-path of the incoming request (the part after the hostname but before any question mark indicating the beginning of a query string) or, in per-directory context, against the request's path relative to the directory for which the rule is defined. But that could probably be clearer. And another error, of syntax this time, about Substitution. We have: file-system path Designates the location on the file-system of the resource to be delivered to the client. Substitutions are only treated as a file-system path when the rule is configured in server (virtualhost) context and the first component of the path in the substitution is exists in the file-system Something's wrong in the last sentence. I guess "is exists" should read "exists". There is also a problem in the part mentioning RewriteBase, but that one is more delicate, I shall remember to open a new report about it. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org For additional commands, e-mail: docs-help@httpd.apache.org