You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2007/01/19 15:11:11 UTC
DO NOT REPLY [Bug 41412] New: - RewriteRule Skip should take negative arguments
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41412>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41412
Summary: RewriteRule Skip should take negative arguments
Product: Apache httpd-2
Version: 2.2.4
Platform: Other
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: mod_rewrite
AssignedTo: bugs@httpd.apache.org
ReportedBy: csaba@alum.mit.edu
RewriteRule's skip flag [S=#] is a relative goto. It would be very nice to have
the possibility of negative arguments for it. So [S=1] means skip the next rule
(already exists), [S=0] means use the next rule (a no-op in other words), [S=-1]
means loop/reevaluate this rule, [S=-2] means goto the previous rule, etc., and
[N] means goto the first rule (already exists). This would cut out a possibly
large amount of unnecessary testing.
Here's an actual use possibility:
# Deepest directory finder: initialization
# At the end, Pfx will have the shallowest non directory
RewriteRule ^(/[^/]*)(.*)$ - [E=Pfx:$1,E=Sfx:$2]
# Deepest directory finder: loop
RewriteCond %{DOCUMENT_ROOT}%{ENV:Pfx}/ -d
RewriteCond %{ENV:Sfx} ^(/[^/]*)(.*)$
RewriteRule . - [E=Pfx:%{ENV:Pfx}%1,E=Sfx:%2,S=-1]
Of course currently I have to use an N in place of that S=-1 and put in a check
for when to run the above at the top of the rewrite rules, which means that the
check gets evaluated on every request and every [N]
Csaba Gabor from Vienna
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 41412] - RewriteRule Skip should take negative arguments
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41412>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41412
bobsiegen@googlemail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
Version|2.2.4 |2.3-HEAD
------- Additional Comments From bobsiegen@googlemail.com 2007-01-26 11:16 -------
Please test the proposed patch. Be aware of bug 38642 (directory context:
continuously adding of path-info to already substituted paths) not to produce an
infinite loop when using negative arguments.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 41412] - RewriteRule Skip should take negative arguments
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41412>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41412
bobsiegen@googlemail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #19468|0 |1
is obsolete| |
------- Additional Comments From bobsiegen@googlemail.com 2007-01-26 11:25 -------
Created an attachment (id=19469)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=19469&action=view)
proposed enhancement
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 41412] - RewriteRule Skip should take negative arguments
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41412>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41412
------- Additional Comments From bobsiegen@googlemail.com 2007-01-26 11:14 -------
Created an attachment (id=19468)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=19468&action=view)
proposed enhancement
patch against trunk
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org