Re: Saving the original request URI ahead of a mod_rewrite

2011-03-13 Thread Eric Covener
On Sat, Mar 12, 2011 at 10:26 PM, Ben Noordhuis i...@bnoordhuis.nl wrote:
 On Sun, Mar 13, 2011 at 04:02, Eric Covener cove...@gmail.com wrote:
 OP specifically mentions internal redirect and rewrite-in-htaccess.

 Hah, the moment I fired off that email I thought oh wait, mod_rewrite
 *does* do an internal redirect somewhere.

 Internal redirects share a pool so your suggestion would work but
 following r-main is still the better solution, I think, if only
 because it works for both redirects and sub-requests.

r-main doesn't change on an internal redirect AFAICT.


Re: Saving the original request URI ahead of a mod_rewrite

2011-03-13 Thread Ben Noordhuis
On Sun, Mar 13, 2011 at 13:15, Eric Covener cove...@gmail.com wrote:
 r-main doesn't change on an internal redirect AFAICT.

You're right. And there is ap_internal_fast_redirect() that works
different still. The only thing I can think of that should work for
all three is to follow r-main until it's NULL, then follow r-prev
until you're at the root request.