Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Docs

DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution

 

 

Apache docs RSS feed   Index | Next | Previous | View Threaded


bugzilla at apache

Apr 3, 2012, 1:25 AM

Post #1 of 13 (327 views)
Permalink
DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution

https://issues.apache.org/bugzilla/show_bug.cgi?id=52000

Daniel Gruno <humbedooh [at] apache> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO

--- Comment #3 from Daniel Gruno <humbedooh [at] apache> 2012-04-03 08:25:59 UTC ---
Pinging on this issue.
From what I can read in the docs, the suggestions have been added - is this
observation correct, and if so, can we close this ticket sometime soon?

--
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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd


bugzilla at apache

Apr 3, 2012, 6:53 AM

Post #2 of 13 (310 views)
Permalink
DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=52000

Daniel Gruno <humbedooh [at] apache> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |FIXED

--- Comment #4 from Daniel Gruno <humbedooh [at] apache> 2012-04-03 13:53:58 UTC ---
After reviewing the changes, I am closing this ticket as resolved, as I am
satisfied that the requests made by the ticket creator has been followed up by
appropriate changes in the documentation.

--
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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd


bugzilla at apache

Apr 10, 2012, 9:03 AM

Post #3 of 13 (296 views)
Permalink
DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=52000

Filipus Klutiero <chealer [at] gmail> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |

--- Comment #5 from Filipus Klutiero <chealer [at] gmail> 2012-04-10 16:03:48 UTC ---
Hi Daniel,
the original problem was partly addressed, but I find that the problem
described in comment 2 remains. The section still contains:

The URI or file path (see "What is matched?", above) is completely replaced by
the Substitution and the rewriting process continues until all rules have been
applied, or it is explicitly terminated by an L flag, or other flag which
implies immediate termination, such as END or F.

However, as explained in What is matched?, a URL-path can also be matched:

In VirtualHost context, The Pattern will initially be matched against the part
of the URL after the hostname and port, and before the query string (e.g.
"/app1/index.html").

In fact, What is matched? does not mention the possibility of directly matching
a URI.

--
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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd


bugzilla at apache

Apr 11, 2012, 10:10 AM

Post #4 of 13 (295 views)
Permalink
DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=52000

Daniel Gruno <humbedooh [at] apache> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEEDINFO

--- Comment #6 from Daniel Gruno <humbedooh [at] apache> 2012-04-11 17:10:13 UTC ---
So, to sum up comment #2: You would like for us to say URL-path instead of URI,
when speaking of what will be replaced?
I could argue that an URI can be both a URL and a URL-path, but after some
discussion with a fellow #httpd staffer, I have been convinced that saying
URL-path might just be the better solution.

Awaiting your reply and such.

--
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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd


bugzilla at apache

Apr 11, 2012, 1:00 PM

Post #5 of 13 (296 views)
Permalink
DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=52000

Filipus Klutiero <chealer [at] gmail> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW

--- Comment #7 from Filipus Klutiero <chealer [at] gmail> 2012-04-11 20:00:48 UTC ---
Daniel, yes.
I also do not see how a URL-path could be a URI. According to RFC 3986 section
1.1.1:

Each URI begins with a scheme name, as defined in Section 3.1, that refers to a
specification for assigning identifiers within that scheme.

Therefore, a URL-path, for example "/index.html", is not a URI according to the
RFC.

--
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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd


bugzilla at apache

Apr 11, 2012, 1:10 PM

Post #6 of 13 (297 views)
Permalink
DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=52000

Daniel Gruno <humbedooh [at] apache> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO

--- Comment #8 from Daniel Gruno <humbedooh [at] apache> 2012-04-11 20:10:38 UTC ---
Okay, I have made the adjustments to the trunk docs, so they now refer to
"URL-path" instead of "URI", and if you're happy with it, I'll make the changes
to the 2.4 docs as well.

--
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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd


bugzilla at apache

Apr 11, 2012, 3:04 PM

Post #7 of 13 (296 views)
Permalink
DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=52000

Filipus Klutiero <chealer [at] gmail> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW

--- Comment #9 from Filipus Klutiero <chealer [at] gmail> 2012-04-11 22:04:50 UTC ---
Thank you Daniel. There is the same problem at the beginning of the section:

Pattern is a perl compatible regular expression. On the first RewriteRule it is
applied to the (%-decoded) URL-path of the request; subsequent patterns are
applied to the output of the last matched RewriteRule.

The first RewriteRule is matched against a filesystem path in directory
context. By the way, I find it slightly misleading to say that the first
RewriteRule is *applied* to the pattern, since the pattern is not really
modified. I would say it is matched against it.

While we're at it. In:

In Directory and htaccess context, the Pattern will initially be matched
against the filesystem path, after removing the prefix that lead the server to
the current RewriteRule (e.g. "app1/index.html" or "index.html" depending on
where the directives are defined).

"lead" should read either "led" or "leads".

--
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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd


bugzilla at apache

Apr 12, 2012, 12:16 AM

Post #8 of 13 (297 views)
Permalink
DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=52000

Daniel Gruno <humbedooh [at] apache> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO

--- Comment #10 from Daniel Gruno <humbedooh [at] apache> 2012-04-12 07:16:47 UTC ---
I have made the changes you suggested and even fixed a case of bad grammar.
Anything else, while we're at it, or can we close up this ticket?

--
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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd


bugzilla at apache

Apr 12, 2012, 8:51 PM

Post #9 of 13 (305 views)
Permalink
DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=52000

Filipus Klutiero <chealer [at] gmail> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW

--- Comment #11 from Filipus Klutiero <chealer [at] gmail> 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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd


bugzilla at apache

Apr 13, 2012, 2:37 AM

Post #10 of 13 (292 views)
Permalink
DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=52000

--- Comment #12 from Daniel Gruno <humbedooh [at] apache> 2012-04-13 09:37:21 UTC ---
Whether or not the actual file exists does not, at the point of mod_rewrite's
hooking into the process, matter where matching is concerned, so I think your
first argument is moot. In terms of initially matching against a request, a
file path is still valid even though the file itself does not exist. It is only
when you either start substituting or when the file handler kicks in, that it
matters whether the path translates to an actual file.

As for the rest, I have made the necessary adjustments to the two documents.

--
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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd


bugzilla at apache

Apr 13, 2012, 7:16 AM

Post #11 of 13 (295 views)
Permalink
DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=52000

Daniel Gruno <humbedooh [at] apache> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED

--- Comment #13 from Daniel Gruno <humbedooh [at] apache> 2012-04-13 14:16:21 UTC ---
I'm going to close this ticket now, as we have already moved way beyond the
scope of the original complaint. If you still have issues with the rewrite
documents, you are welcome to open a new ticket, but I must ask that you do so
for each specific subject that comes to mind, so it won't end up like a
never-ending ticket like this one.

Having each specific subject in a separate thread would also greatly ease the
discussion, as we know to what we are replying, and within which scope we're
discussing the issue.

You are, of course, also very welcome to submit a patch for the documents you
want changed, so we won't have to muck about ourselves when a few wordings need
change here and there.

--
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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd


bugzilla at apache

Apr 13, 2012, 10:16 AM

Post #12 of 13 (293 views)
Permalink
DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=52000

--- Comment #14 from Filipus Klutiero <chealer [at] gmail> 2012-04-13 17:16:29 UTC ---
Thank you once more for your changes, Daniel.

I opened a new request about a minor problem left in the introduction (bug
53080).

But I still think that the second parenthesis in "On the first RewriteRule, it
is matched against the (%-decoded) URL-path (or file-path, depending on the
context) of the request." is wrong.

I forgot to mention, just below we expand on that:
In Directory and htaccess context, the Pattern will initially be matched
against the filesystem path, after removing the prefix that led the server to
the current RewriteRule (e.g. "app1/index.html" or "index.html" depending on
where the directives are defined).

I find this less bad, although one may ask *which* filesystem path this refers
to.

Let me try to put the issue differently: What is the file-path of a request?

--
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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd


bugzilla at apache

Apr 26, 2012, 9:50 AM

Post #13 of 13 (254 views)
Permalink
DO NOT REPLY [Bug 52000] RewriteRule documentation unclear/misleading about substitution [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=52000

--- Comment #15 from Filipus Klutiero <chealer [at] gmail> 2012-04-26 16:50:19 UTC ---
I reported the "file-path" problem in #53153. I also opened #53152 about the
part which mentions RewriteBase.

--
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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd

Apache docs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.