It's not only easy but also an honour for me to put together the pieces ... The recursion counter works (after adding incr __rp_internal_redirect_recursion_counter to actually increment it, thanks for leaving that to me Lars 😉.
Everybody should test it to see the looong beautiful stacktraces that caught recursions produce ...
BTW, how or why do globals work this way? I read somewhere else that in aolserver >2 globals are flushed upon thread-deallocation (which means end of connection i guess). Yet the tcl_url2file mapping in rp_handler uses globals as if they survive several connections, by storing the url to file mapping in a global array, which wouldn't make any sense if the array was flushed at the end of the connection. This also seems to work because otherwise the failure that caused this thread would have never occured ... so how do globals really work? Or what am I missing here?
(still wondering if the tcl_url2file mapping should not actually be in an ns_share)