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.
- per-server configurations
- per-virtual-host configurations
It requires only one argument. logfile_path can be either the full or the relative path to the logfile. "Relative" refers to the IIS worker process's current directory which can be modified by other applications running in the same IIS worker process space. Therefore it is recommended that you specify a full path.
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:
You MUST use this directive in conjunction with RewriteLogLevel directive to specify the level of log filtering. If no RewriteLogLevel is specified, then log level 0 is assumed and no logging occurs.
- 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.
If you want to disable logging, you must either comment out the RewriteLog directive, or specify RewriteLogLevel 0.