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.
Logging for mod_rewrite is now achieved using the ErrorLog directive, see logging to configure the log level. A value of trace5 is recommended.
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.
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: