Bug 44279

Summary: Add "iterate" flag to apply rule in a loop while pattern matches
Product: Apache httpd-2 Reporter: Rainer Jung <rainer.jung>
Component: mod_rewriteAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: enhancement CC: covener
Priority: P2 Keywords: PatchAvailable
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Patch against trunk
Patch against 2.2.x

Description Rainer Jung 2008-01-22 10:25:29 UTC
I stumbled over a situation, where a RewriteRule was used to replace all
occurences of a pattern in the URL by something else.

This was solved by using N and L flag to restart the rules after a match and to
stop in case of non-match. This construct is a little complex, especially if
there are also other rules used.

It's very easy to implement an additional flag to let a single RewriteRule
iterate in a loop as long as the RewriteConds and the pattern applies. It's
similar to the "g" flag in /xxx/yyy/g.

I attach a patch against trunk and one against 2.2.x for source and docs.
Comment 1 Rainer Jung 2008-01-22 10:26:12 UTC
Created attachment 21412 [details]
Patch against trunk
Comment 2 Rainer Jung 2008-01-22 10:26:37 UTC
Created attachment 21413 [details]
Patch against 2.2.x