How do you troubleshoot Apache redirects in production? I know there's a a logging feature somewhere that lets you log all the redirects that happen...

link|improve this question

43% accept rate
feedback

2 Answers

up vote 4 down vote accepted

You need to set the following options:

RewriteLog         /path/to/mod_rewrite.log
RewriteLogLevel    2

in your Apache config (you can't set them in your .htaccess)

This will give you a log showing you what is going on.

Also see the mod_rewrite docs

link|improve this answer
This will not work if they are actual Redirects and not RewriteRules. – Vinko Vrsalovic May 22 '09 at 18:00
Very true, I was making the assumption that he was using mod_rewrite :) – Nathan May 22 '09 at 20:09
feedback

I know it's the obvious statement to make, but if your website is busy enough for it to matter, the redirect rules should already be troubleshooted by the time you roll them out in production... (but of course I also know real life doesn't always work properly ;-)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.