[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-docs
Subject:    DO NOT REPLY [Bug 53080] New: Apache mod_rewrite Introduction - RewriteRule Basics: misleading about
From:       bugzilla () apache ! org
Date:       2012-04-13 17:06:12
Message-ID: bug-53080-56585 () https ! issues ! apache ! org/bugzilla/
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic