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. Download and install the URL Rewrite module on the IIS web server. To download this module, go to the URL: http://www.iis.net/downloads/microsoft/url-rewrite

  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” />

      Figure 97 : Setting the dynamicCompressionBeforeCache property to false

      Alternatively, you can run the following command from the command prompt:

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

    • Re-order the IIS modules to have URL Rewrite module (RewriteModule) run 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.

    • Restart IIS.