I've got an application which seems to be stuck in a redirect loop when I put it in a subdirectory of my server (e.g. blah.com/testing/ instead of blah.com/), despite sharing the same code. I think I've handled the redirection stuff incorrectly, but Apache's debugging output doesn't actually list the redirections, because they're being handled inside PHP.
Is there an easy way to attach a logger to the redirection function?