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.
apache HTTP server 2.4
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:
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:
The following directives must be placed in the Server context, in the same fashion as editing your vhost: