URL Rewrite Module 2.0 for IIS 7 – Beta

Today IIS team has released the URL Rewrite Module 2.0 for IIS 7 – Beta. This is an incremental release that includes all the features from version 1.1, and adds support for outbound response rewriting. More specifically, it can be used to:

  • Replace the URLs generated by a web application in the response HTML with a more user friendly and search engine friendly equivalent
  • Modify the links in the HTML markup generated by a web application behind a reverse proxy.
  • Fix up the content of any HTTP response by using regular expression pattern matching

Install the URL Rewrite Module 2.0 Beta


or, download:

URL Rewrite Module 2.0 for IIS 7 – Beta (x86)

URL Rewrite Module 2.0 for IIS 7 – Beta (x64)


  • URL Rewrite v1.0 and v2.0 cannot be installed side-by-side.
  • URL Rewrite v1.1 and v2.0 cannot be installed side-by-side.
  • If URL Rewrite v1.0 or v1.0 is already installed, uninstall it before proceeding with installing URL Rewrite Module v2.0 Beta.

New Features

URL Rewrite Module 2.0 includes the following key features:

  • Rules-based response rewriting engine. Outbound rules are used to express the logic of what to compare parts of the response with and what to do if comparison was successful. Web server and site administrators can use outbound rules to define complex response rewriting logic.
  • Rewriting within the content of specific HTML tags. Instead of scanning the entire response for a particular match, the rule can be configured to look only inside of certain HTML tags, such as <a>, <img>, etc. That way the pattern is greatly simplified and the process of applying the rule to the content is much faster comparing to applying the pattern to the entire response.
  • Pre-conditions for outbound rules. Applying rewrite rules on every response is an expensive operation and is not necessary in majority of the cases. Pre-conditions are used to check the response metadata to determine if outbound rules evaluation should be applied.
  • Setting of server variables and HTTP headers. Various IIS server variables and HTTP request headers can be set by using rewrite rules.
  • Tracking capture groups across rule conditions. The conditions back-referencing logic in URL Rewrite 1.1 worked only against the last matched conditions. In v2 it is possible to configure back-referencing logic to work against all matched conditions.
  • Logging of rewritten URLs. The module can be configured to log the rewritten URL in IIS W3C logs as opposed to logging an originally requested URL.

More information

Use the following links to get more information about URL Rewrite Module 2.0 Beta:

Also, be sure to visit the URL Rewrite Forum on IIS.NET if you have run into any problems when using the module or have questions or suggestions.


ruslany on July 16th 2009 in URLRewrite

PoorFairAverageGoodExcellent (No Ratings Yet)

7 Responses to “URL Rewrite Module 2.0 for IIS 7 – Beta”

  1. Gravatar ImageNewsPeeps responded on 17 Jul 2009 at 9:28 am #

    URL Rewrite Module 2.0 for IIS 7 – Beta | RuslanY Blog…

    Thank you for submitting this cool story – Trackback from NewsPeeps…

  2. Gravatar Imagerykn responded on 30 Jul 2009 at 3:20 pm #

    I have a problem on my IIS7 with this release, it is the first time I am trying this, and no luck so far, just would not work. Running on server 2008, latest patches etc.

    This is my web.config entry:

    The current URL in the browser looks like this -> http://localhost/myapp/genericpage.aspx?pid=sample
    But want it to look like this -> http://localhost/myapp/sample/genericpage.aspx

    What am I doing wrong? Any help would be much appreciated.

  3. Gravatar Imageruslany responded on 30 Jul 2009 at 3:48 pm #

    Can you please XML encode the rewrite rules and then re-post them in the comment?

  4. Gravatar ImageRuslanY Blog responded on 09 Nov 2009 at 10:54 am #

    URL Rewrite Module v2 – Release Candidate…

    The URL Rewrite Module 2.0 – Release Candidate is available for download. The release contains functionality and stability improvements and it is believed to have a quality level suitable for production deployments.
    Install the URL Rewrite Module…

  5. Gravatar ImageSteve responded on 14 Apr 2010 at 6:05 am #

    This looks like a really good feature -do you have any data on the performance impact of parsing and modifying output? I appreciate that its server specific but any info would be of interest.



  6. Gravatar Imageruslany responded on 14 Apr 2010 at 11:47 pm #

    Steve: there will be a performance impact caused by parsing and modifying an output. It depends on how many matches are found in the output and what kind of request it is. For example if it is a static file then the performance impact is more noticeable because statis files are super fast on IIS. If it is a database bound dynamic application then the outbound rewriting is usulally not the performance bottleneck.
    I do not have any numbers to share – I recommend to just set up the rules and do a load test on your application to see how much it affects it.

  7. Gravatar ImageSriraj responded on 03 May 2010 at 10:53 pm #

    Hi I am trying to use rewrite module 2.0 to rewrite a simple ststic url but i cant get this to work

    the page i am trying to rewrite looks something like this

    i want to rewrite it as

    i have been using rewrite module 1 and everything worked perfectly but since i installed version 2.o i cant even get simple static urls to rewrite / redirect correctly. I would appreciate any suggestions on how to get this working.

Trackback URI | Comments RSS

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

XML Markup: If You want to add XML code to the comment please XML encode it first, otherwise the code will not show up.

Recently Published Articles