Purpose
As you build more complex rewrite rules, you may find yourself in a situation where debugging is required. The rewrite log will allow you to examine the process in which mod_rewrite examines the requested URI, and applies the requested patterns.
Configuration
apache HTTP server 2.4
Logging for mod_rewrite is now achieved using the ErrorLog directive, see logging to configure the log level. A value of trace5 is recommended.
apache HTTP server 2.2 (and older)
By editing your vhost
Place the following directives in your vhost, if defined in your configuration. Otherwise, place them in the server context:
RewriteLog /path/to/log
Using a RewriteLogLevel value higher than 5 will not produce additional logging output and using a lower level will hide important information.
By editing the Server context
Rewrite rules in the server context can still apply to specific vhosts with the following directives in each vhost:
RewriteOptions inherit
The following directives must be placed in the Server context, in the same fashion as editing your vhost:
RewriteLog /path/to/log