httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 53080] New: Apache mod_rewrite Introduction - RewriteRule Basics: misleading about what Pattern is matched against
Date Fri, 13 Apr 2012 17:06:12 GMT
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@httpd.apache.org
        ReportedBy: chealer@gmail.com
    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@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Mime
View raw message