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

Mailing List Archive: Apache: Docs

[Bug 53080] 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

May 1, 2012, 2:45 AM

Post #1 of 10 (263 views)
Permalink
[Bug 53080] Apache mod_rewrite Introduction - RewriteRule Basics: misleading about what Pattern is matched against

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

Daniel Gruno <humbedooh [at] apache> changed:

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

--- Comment #1 from Daniel Gruno <humbedooh [at] apache> ---
I have applied your suggestion and added a note that the URL-path of the
incoming request is matched in the first rewriterule or until a substitution
takes place, and that rules that follow are matched against the substituted
value instead.

Do give it a read-through and tell me what you think of this new wording.

--
You are receiving this mail because:
You are the assignee for the bug.


bugzilla at apache

May 3, 2012, 11:56 AM

Post #2 of 10 (247 views)
Permalink
[Bug 53080] Apache mod_rewrite Introduction - RewriteRule Basics: misleading about what Pattern is matched against [In reply to]

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

Filipus Klutiero <chealer [at] gmail> changed:

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

--- Comment #2 from Filipus Klutiero <chealer [at] gmail> ---
Thank you Daniel. The paragraph now contains:

for the first rewrite rule or until a substitution occurs

It would be slightly clearer to have:

for the first rewrite rule and until a substitution occurs

Also, in "Once a substitution has occured, the rules that follow are matched
against the substituted value.", "the substituted value" is confusing since
there can be several. Replacing "substituted value" with "last substitution"
would clarify.

--
You are receiving this mail because:
You are the assignee for the bug.


bugzilla at apache

May 3, 2012, 2:02 PM

Post #3 of 10 (250 views)
Permalink
[Bug 53080] Apache mod_rewrite Introduction - RewriteRule Basics: misleading about what Pattern is matched against [In reply to]

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

--- Comment #3 from Kyle Hamilton <kyanha [at] kyanha> ---
So, basically, what I'm reading is that RewriteRule is most like Perl's $_
scalar.

"Once a substitution has occured, the rules that follow are matched against the
substituted value."

I propose:

Once a substitution has occurred in the value, the rules that follow are
matched against the value as it exists after the substitution has taken place.

--
You are receiving this mail because:
You are the assignee for the bug.


bugzilla at apache

May 3, 2012, 2:05 PM

Post #4 of 10 (253 views)
Permalink
[Bug 53080] Apache mod_rewrite Introduction - RewriteRule Basics: misleading about what Pattern is matched against [In reply to]

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

--- Comment #4 from Eric Covener <covener [at] gmail> ---
(In reply to comment #3)
> So, basically, what I'm reading is that RewriteRule is most like Perl's $_
> scalar.
>
> "Once a substitution has occured, the rules that follow are matched against
> the substituted value."
>
> I propose:
>
> Once a substitution has occurred in the value, the rules that follow are
> matched against the value as it exists after the substitution has taken
> place.

I think this is a step backwards

--
You are receiving this mail because:
You are the assignee for the bug.


bugzilla at apache

May 3, 2012, 5:18 PM

Post #5 of 10 (249 views)
Permalink
[Bug 53080] Apache mod_rewrite Introduction - RewriteRule Basics: misleading about what Pattern is matched against [In reply to]

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

--- Comment #5 from Kyle Hamilton <kyanha [at] kyanha> ---
(In reply to comment #4)
> (In reply to comment #3)
> > So, basically, what I'm reading is that RewriteRule is most like Perl's $_
> > scalar.
> >
> > "Once a substitution has occured, the rules that follow are matched against
> > the substituted value."
> >
> > I propose:
> >
> > Once a substitution has occurred in the value, the rules that follow are
> > matched against the value as it exists after the substitution has taken
> > place.
>
> I think this is a step backwards

Why?

How about:

All mod_rewrite rules match against and destructively transform a single value.
The value after a given transformation is the value seen and matched against
by the next rule in the chain.

--
You are receiving this mail because:
You are the assignee for the bug.


bugzilla at apache

May 3, 2012, 7:29 PM

Post #6 of 10 (250 views)
Permalink
[Bug 53080] Apache mod_rewrite Introduction - RewriteRule Basics: misleading about what Pattern is matched against [In reply to]

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

--- Comment #6 from Filipus Klutiero <chealer [at] gmail> ---
Hi Kyle,
I can't speak for Eric, but I find this part unclear:

the value as it exists after the substitution has taken place

A reader may wonder "The value of what?".

As for your second suggestion, I'm not sure what you're proposing exactly (how
that sentence would integrate in the rest of the section), but I have no idea
of what "destructively transform" would mean.

--
You are receiving this mail because:
You are the assignee for the bug.


bugzilla at apache

May 4, 2012, 4:19 AM

Post #7 of 10 (241 views)
Permalink
[Bug 53080] Apache mod_rewrite Introduction - RewriteRule Basics: misleading about what Pattern is matched against [In reply to]

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

--- Comment #7 from Rich Bowen <rbowen [at] apache> ---
Are we trying to say something like

Each rule encountered modifies the value of the required uri as you go along.
So each rule gets the modified value from any previous rule.

It appears that as we try to get more technically accurate we become less
clear. doesn't feel like progress to me.

--
You are receiving this mail because:
You are the assignee for the bug.


bugzilla at apache

May 4, 2012, 1:10 PM

Post #8 of 10 (244 views)
Permalink
[Bug 53080] Apache mod_rewrite Introduction - RewriteRule Basics: misleading about what Pattern is matched against [In reply to]

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

--- Comment #8 from Kyle Hamilton <kyanha [at] kyanha> ---
(In reply to comment #7)
> Are we trying to say something like
>
> Each rule encountered modifies the value of the required uri as you go
> along. So each rule gets the modified value from any previous rule.
>
> It appears that as we try to get more technically accurate we become less
> clear. doesn't feel like progress to me.

In each rule, there is a pattern, a substitution, and optionally a set of
flags.

The first rule's input is the URI requested by the client. For each rule, when
the pattern does not match, that rule's output is its unaltered input. When it
matches, the substitution/flags are applied and the substituted string is the
rule's output. The output of the prior rule is the input to the next. When
the rule is the final rule in the chain, its output is the final rewritten URI
or URL that httpd processes. There are flags which can tell httpd not to
process any rules following the flagged rule.

--
You are receiving this mail because:
You are the assignee for the bug.


bugzilla at apache

May 4, 2012, 1:20 PM

Post #9 of 10 (241 views)
Permalink
[Bug 53080] Apache mod_rewrite Introduction - RewriteRule Basics: misleading about what Pattern is matched against [In reply to]

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

--- Comment #9 from Rich Bowen <rbowen [at] apache> ---
Guys, this ticket is marked as closed. If it's closed, please move on. If it's
not fixed yet, please either reopen it, or, preferably, open a new one with a
clearer statement of what problem it is that we're trying to solve. It is no
longer at all clear what problem we're chasing.

Thanks.

--
You are receiving this mail because:
You are the assignee for the bug.


bugzilla at apache

May 5, 2012, 8:20 AM

Post #10 of 10 (241 views)
Permalink
[Bug 53080] Apache mod_rewrite Introduction - RewriteRule Basics: misleading about what Pattern is matched against [In reply to]

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

--- Comment #10 from Filipus Klutiero <chealer [at] gmail> ---
Regarding "The output of the prior rule is the input to the next.", there may
be several prior rules. And the "output" of any prior rule does not necessarily
exist, if no prior rule ran.

--
You are receiving this mail because:
You are the assignee for the bug.

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.