Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 5 down vote accepted

To log what's going on in the mod_rewrite module you need to set RewriteLog and RewriteLogLevel:

RewriteLog         /path/to/mod_rewrite.log
RewriteLogLevel    2

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

Note that logging has changed in Apache 2.4.

share|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

I generally create my own verbose CustomLog. In it, I include the HTTP Response header Location

I also include other things such as the response time and HTTP Request header X-Forwarded-For, amongst a select other few things.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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