On 24/07/07, André Malo <[EMAIL PROTECTED]> wrote:
It is, if you're doing it explicitly. Most people use [L] though, so it
doesn't matter very much. IIRC, if done implicitly, the [P] flag finishs
the set, the [R] flag doesn't. But I need to check against the sources as
well :-)

RewriteEngine On
RewriteRule ^/foo http://example.com/
RewriteRule http://example.com/ http://apache.org/

RewriteRule ^/bar /with_ice_please?in=small&chunks
RewriteRule /with_ice_please\?in=small&chunks http://apache.org/

RewriteRule ^/baz proxy:http://localhost/
RewriteRule proxy:http://localhost/ http://apache.org/


The first and third do as requested, the second doesn't because the
query string is separated:

(2) init rewrite engine with requested uri /bar
(3) applying pattern '^/foo' to uri '/bar'
(3) applying pattern 'http://example.com/' to uri '/bar'
(3) applying pattern '^/bar' to uri '/bar'
(2) rewrite '/bar' -> '/with_ice_please?in=small&chunks'
(3) split uri=/with_ice_please?in=small&chunks ->
uri=/with_ice_please, args=in=small&chunks
(3) applying pattern '/with_ice_please\?in=small&chunks' to uri
'/with_ice_please'
(3) applying pattern '^/baz' to uri '/with_ice_please'
(3) applying pattern 'proxy:http://localhost/' to uri '/with_ice_please'
(2) local path result: /with_ice_please
(2) prefixed with document_root to
/Users/noodl/Services/www/test1/with_ice_please
(1) go-ahead with /Users/noodl/Services/www/test1/with_ice_please [OK]


> No easy "[x] that one" fix?

Not that easy. I think, explaining the start (URL-path, absolute in server
context but relative to the .htaccess in directory context) and mentioning
the "current" part for further matches should do.

Just goes to show, if you think you know mod_rewrite you're probably
wrong, and if you're right, you've got issues :-)

I'll give Joshua's suggestions a shot.

--
noodl

Reply via email to