1. Open Internet Information Services (IIS) Manager
    Installing UrlRewriter.NET on Windows Server 2003_第1张图片
    click to expand
  2. Right-click on the website where you want to configure UrlRewriter.NET and select Properties.
    Installing UrlRewriter.NET on Windows Server 2003_第2张图片
    click to expand
  3. Click on the Home Directory tab.
    Installing UrlRewriter.NET on Windows Server 2003_第3张图片
    click to expand
  4. Click the Configuration button.
    Installing UrlRewriter.NET on Windows Server 2003_第4张图片
    click to expand
  5. Select the .asax application extension and click Edit…
    Installing UrlRewriter.NET on Windows Server 2003_第5张图片
    click to expand
  6. Copy the Executable path (…/aspnet_isapi.dll) to the clipboard and click Cancel.
    Installing UrlRewriter.NET on Windows Server 2003_第6张图片
    click to expand
  7. Click Insert…
    Installing UrlRewriter.NET on Windows Server 2003_第7张图片
    click to expand
  8. Paste the Executable path (…/aspnet_isapi.dll) from the clipboard, untick Verify that file exists.
    Installing UrlRewriter.NET on Windows Server 2003_第8张图片
    click to expand
  9. Click OK to close the Add/Edit Application Extension Mapping dialog
    Installing UrlRewriter.NET on Windows Server 2003_第9张图片
    click to expand
  10. Click OK to close the Application Configuration dialog.
    Installing UrlRewriter.NET on Windows Server 2003_第10张图片
    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.