Registry values for IIS URL Rewrite

The following registry values can be set for the IIS URL Rewrite module and will affect the global behavior of the module; use them at your own risk :)

All these values (DWORD) can be set under the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Rewrite

MaxBackReferences – By default 31 (maximum value). Defines the maximum number of back-references that can be used. For example, if you set it to 9, administrator won’t be able to use {R:10} in their rewrite expressions.

RewriteCacheEnabled – By default 1 (true). Enables (1) or disables (0) the internal cache of rewritten URLs. Disabling it will have a negative performance impact.

UrlDecodeAllowsDoubleEncoding – By default 1 (true). The module provides a UrlDecode built-in function that allows to decode strings like %25 into single characters. The function will fail by default if finds a double encoded string like %252E, where %25 is first decoded to (%) and in a second pass %2E is decoded to (.). Setting this registry value to 0 can be security problem.

InboundRewriteEnabled – By default 1 (true). Setting this value to 0 (false) will make URL Rewrite to stop listening the IIS notifications, even if you have inbound rules, it won’t process them.

OutboundRewriteEnabled – By default 1 (true). Setting this value to 0 (false) will make URL Rewrite to stop listening notifications for sending responses. This also affects the logRewrittenUrl feature, it will stop working because it relies on those IIS notifications.

LogRewrittenUrlEnabled – By default 1 (true). It can be used to disable the logRewrittenUrl feature.

All these values are read during startup, so you need to recycle your worker process if you change the values and as I said, use them at your own risk.

No Comments