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

Mailing List Archive: Apache: Docs

DO NOT REPLY [Bug 53080] New: Apache mod_rewrite Introduction - RewriteRule Basics: misleading about what Pattern is matched against

 

 

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


bugzilla at apache

Apr 13, 2012, 10:06 AM

Post #1 of 1 (86 views)
Permalink
DO NOT REPLY [Bug 53080] New: Apache mod_rewrite Introduction - RewriteRule Basics: misleading about what Pattern is matched against

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

Bug #: 53080
Summary: Apache mod_rewrite Introduction - RewriteRule Basics:
misleading about what Pattern is matched against
Product: Apache httpd-2
Version: 2.5-HEAD
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Documentation
AssignedTo: docs [at] httpd
ReportedBy: chealer [at] gmail
Classification: Unclassified


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) or, in per-directory context,
against the request's path relative to the directory for which the rule is
defined.

This is correct for the first RewriteRule, but not necessarily for the
following rules. As explained in
http://httpd.apache.org/docs/trunk/en/mod/mod_rewrite.html#rewriterule :
On the first RewriteRule, it is matched against the (%-decoded) URL-path (or
file-path, depending on the context) of the request. Subsequent patterns are
matched against the output of the last matching RewriteRule.

I suggest this formulation instead:

Pattern is a regular expression. It is initially (for the first rewrite rule)
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.

This doesn't specify what happens after the first rewrite rule, so it's
incomplete, but it's just an introduction, so I think it's fine as long as it's
not misleading.

--
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.