In mod_rewrite.c, I see ap_hook_translate_name(hook_uri2file, NULL, NULL, APR_HOOK_FIRST);
In mod_proxy.c, I see /* fixup before mod_rewrite, so that the proxied url will not * escaped accidentally by our fixup. */ static const char * const aszSucc[]={ "mod_rewrite.c", NULL }; ap_hook_translate_name(proxy_trans, aszSucc, NULL, APR_HOOK_FIRST); Now, mod_rewrite's hook_uri2file sets r->proxyreq = PROXYREQ_REVERSE if it activates a [P], and mod_proxy's proxy_trans What exactly is the risk that's protecting against? I'd like to run the mod_rewrite hook before the mod_proxy one, to have the mod_rewrite environment variables available in proxy_trans. It looks to me as if the only thing that'll affect that ordering is mod_proxy's if (r->proxyreq) { /* someone has already set up the proxy, it was possibly ourselves * in proxy_detect */ return OK; } So, presumably it should work if I run two proxy_trans hooks: the first just makes the above check and returns DECLINED if not; the second makes the same check but follows it with the ProxyPass stuff. Or am I missing something deeper? -- Nick Kew