
RewriteLog Directive
RewriteLog directive is used to create a log file and specify its name. All the actions taken by IIS Mod-Rewrite at runtime, are logged in full detail in the specified file.
This directive can be used only once in a rewrite configuration scope.
Configuration context
- per-server configurations
- per-virtual-host configurations
Syntax
RewriteLog logfile_path
It requires only one argument. logfile_path can be either the full or the relative path to the logfile.
When you specify a logfile, make sure that the running IIS process has full access rights to the directory that the log file will be created in. Depending on the IIS version, the following users or user groups must have full access rights to the directory that log file will be created:
- IIS 7: IIS_IUSRS or the current Application Pool's Identity User
- IIS 6: IIS_WPG or the current Application Pool's Identity User
- IIS 5: IWAM_COMPUTERNAME if running in high (isolated) or medium (pooled) isolation mode, or SYSTEM if running in low (in-process) isolation mode mode.
You can use this directive in conjunction with RewriteLogLevel directive to specify the level of log filtering.
If you want to disable logging, you must either comment out the RewriteLog directive, or specify RewriteLogLevel 0.
|