Bug 44279 - Add "iterate" flag to apply rule in a loop while pattern matches
Summary: Add "iterate" flag to apply rule in a loop while pattern matches
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_rewrite (show other bugs)
Version: 2.5-HEAD
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2008-01-22 10:25 UTC by Rainer Jung
Modified: 2008-01-24 07:29 UTC (History)
1 user (show)



Attachments
Patch against trunk (2.49 KB, patch)
2008-01-22 10:26 UTC, Rainer Jung
Details | Diff
Patch against 2.2.x (2.49 KB, patch)
2008-01-22 10:26 UTC, Rainer Jung
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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