Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

IIS Rewrite Module 2.0 released

Beta version though...

7:28 am on Jul 17, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 1, 2005
votes: 0

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.

source: IIS Blog [blogs.iis.net]

More info:
URL Rewrite Module 2.0 usage walkthroughs [learn.iis.net]
URL Rewrite Module 2.0 configuration reference [learn.iis.net]

This looks great, I was already very happy with version 1.1, but the ability to clean up URLs before they are sent to the browser will be great for some of the older sites I manage.

10:09 am on July 17, 2009 (gmt 0)

Preferred Member

10+ Year Member

joined:Dec 26, 2006
votes: 0

I developed my own rewrite engine using the .net 2.0 tech, I sincerely hope that continues to be compartible with all variants of .net as the various host web servers get updated
8:17 pm on July 20, 2009 (gmt 0)

New User

10+ Year Member

joined:Dec 11, 2008
votes: 0

i was hoping that this module would make it easy to do non-www to www redirects easier than in IIS 6.0, but i have been let down.

sadly, creating two website profiles and using a permanent redirect to www site com$S$Q was much easier than setting up a redirect in IIS 7.0.

i know it may be easier to just make changes to the web.config file, but i have to make simple instructions for a coworker to work on setting up the redirects and XML code is a bit beyond her.

5:22 am on July 21, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 1, 2005
votes: 0

Hi salzano,

Here is some code for a non-www to www redirect:

<rule name="Redirect to www" stopProcessing="true">
<match url=".*" />
<add input="{HTTP_HOST}" pattern="^example.com$" />
<action type="Redirect" url="http://www.example.com/{R:0}" redirectType="Permanent" />

You can also group multiple rules [webmasterworld.com]

I am currently writing up an intro to the new module with a collection of useful rules. Hopefully I will have this ready soon for posting.