Pre-requisites for Using the URL Rewrite Module

Prior to configuring URL Rewrite rules, check if the following are in place:

  1. Make sure that you have access to the IIS Manager console.

  2. The IIS manager console should have the following modules installed and available:

    • URL Rewrite Module

    • Compression Module

    If these modules do not pre-exist, then download them from the URL, http://www.iis.net/downloads/microsoft/, and install them.

  3. Ensure that a web site/ web application on IIS has already been added as a Real User Monitor using the eG administrative interface. The JavaScript code snippet that eG provides when adding the component should be copied to a text file.

  4. Check whether compression (static and/or dynamic) is enabled for the web site/web application that is to be RUM-enabled. To perform this check, refer to the procedure detailed in the How to Check Whether/Not Compression is Enabled? topic.

  5. If Compression is enabled, then additionally, perform the following steps:

    • First, verify whether the target web application is a 32-bit application or a 64-bit application. For that, refer to the Verifying Whether Web Application is a 32-bit or 64-bit Application topic. If the target web application is a 32-bit application that is running on a 64-bit machine, then execute the following command at the command prompt:

      reg add HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432node\Microsoft\Inetstp\Rewrite /v LogRewrittenUrlEnabled /t REG_DWORD /d 0

       

      On the other hand, if the target application is a 64-bit application running on a 64-bit machine, then execute the following command at the command prompt:

      reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Rewrite /v LogRewrittenUrlEnabled /t REG_DWORD /d 0

    • Next, make sure that the dynamicCompressionBeforeCache property is set to false for the /system.webServer/urlCompression configuration element. For this, add the following entry in the web.config file as depicted by .

      <urlCompression doStaticCompression=”false” doDynamicCompression=”true” dynamicCompressionBeforeCache=”false” />

      Setting dynamicCompressionBeforeCache Property to False

      Figure 1 : Setting the dynamicCompressionBeforeCache property to false

      If there is any issue accessing the web.config file, then alternatively, you can run the following command from the command prompt as Administrator:

      appcmd.exe set config "WEBSITENAME" -section:system.webServer/urlCompression /dynamicCompressionBeforeCache:"False"

    • Make sure that the URL Rewrite module (RewriteModule) runs before Dynamic Compression module (DynamicCompressionModule). In other words, in the modules ordered view of the IIS Manager console, the Dynamic Compression module should be above the URL Rewrite module. To know how to achieve this, refer to Reordering IIS Modules.

    • Restart IIS.