httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40004] - Mod_rewrite 'Last' flag doesn't seem to end rewriting
Date Thu, 13 Jul 2006 10:41:32 GMT
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=40004>.
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=40004





------- Additional Comments From robsiegen@googlemail.com  2006-07-13 10:41 -------
(In reply to comment #8)
> The more I think about it, the more I think this is a misfeature.  If '[L]'
> doesn't stop further rewriting (in directory rules), then it doesn't serve a
> purpose (in directory rules).

Well, as  André said, it stops processing in that round of processing. The
internal redirect is nearly a new request (well, not everything is being
re-processed). The L-Flag is usefull in per-dir context, just think about 20
rules and the first did match. With out the L-flag everything below would be
tested in that round of processing, too. That saves processing. I don't think
that writing something like "don't apply rewrite rules any more" into
request_rec is a solution, think about the situation rewriting /a to /b while
there are rewriteRules in palce fpr <directory /var/www/b>.

> Is there a workaround?

Either use THE_REQUEST or ENV:REDIRECT_STATUS

    RewriteBase /db/
    RewriteRule ^experiment-1 experiment-2 [L]
    RewriteCond %{ENV:REDIRECT_STATUS} =""
    RewriteRule ^experiment-2 experiment-3

or

    RewriteBase /db/
    RewriteRule ^experiment-1 experiment-2 [L]
    RewriteCond %{THE_REQUEST} experiment-2
    RewriteRule ^experiment-2 experiment-3

> The new rewrite flags documentation (httpd.apache.org/docs/rewrite/flags.html)

There is a small mistake:
RewriteRule %{REQUEST_URI} \.(png|gif|jpg) - [E=image:1]

should be

RewriteRule \.(png|gif|jpg) - [E=image:1]

-- 
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


Mime
View raw message