httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution
Date Fri, 13 Apr 2012 03:51:23 GMT

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

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.


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

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:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message