1. Open Internet Information Services (IIS) Manager

    click to expand
  2. Right-click on the website where you want to configure UrlRewriter.NET and select Properties.

    click to expand
  3. Click on the Home Directory tab.

    click to expand
  4. Click the Configuration button.

    click to expand
  5. Select the .asax application extension and click Edit…

    click to expand
  6. Copy the Executable path (…/aspnet_isapi.dll) to the clipboard and click Cancel.

    click to expand
  7. Click Insert…

    click to expand
  8. Paste the Executable path (…/aspnet_isapi.dll) from the clipboard, untick Verify that file exists.

    click to expand
  9. Click OK to close the Add/Edit Application Extension Mapping dialog

    click to expand
  10. Click OK to close the Application Configuration dialog.

    click to expand
  11. Click OK to close the Properties dialog.
  12. That’s it! The server is configured to allow UrlRewriter.NET to work its magic.

There are a few things to note with this configuration:

  1. All web requests will now be sent through the ASP.NET runtime.
  2. Default documents specified in IIS will stop working. You will need to add a rule to your rewrite rules to support the default documents you want, as in:
    <rewrite url=”^(.*)/(/?.+)?$” to=”$1/default.aspx$2″ />
  3. Requests for images, stylesheets, favicon.ico and everything else will be processed by .NET. You may want to add rules to cater for these. This is also a bonus, in that you can now restructure your website assets and put in place the correct rewriting rules to ensure these can be found in the new location.