Using the Microsoft URL Rewrite Module for IIS 7.0

 

An Introduction to URL Rewriting

One of the greatest things about dynamic Web sites is the fact that you can build one page and based on the parameters that are passed to that page it can display any number of different results. For example, let’s say that you’re building a Web-based grocery store. Instead of creating a separate static HTML page for each category of product you carry, you can simply create a single Category.aspx file and pass it a parameter indicating what category of products you want to display:

http://www.MyVirtualGroceryStore.com/Products/Category.aspx?Category=Fruit
http://www.MyVirtualGroceryStore.com/Products/Category.aspx?Category=Meat
http://www.MyVirtualGroceryStore.com/Products/Category.aspx?Category=Vegetables

While the resulting Web pages are all generated by the single script, they’ll each display a very different lists of items. This type of power is great for us as developers, but it’s not so good for users and even worse if you’re trying to get the pages indexed by search engines. While I created the examples above to be as user-friendly as possible, they’re still not all that simple to the average user. These are simpler and much more intuitive:

http://www.MyVirtualGroceryStore.com/Products/Fruit
http://www.MyVirtualGroceryStore.com/Products/Meat
http://www.MyVirtualGroceryStore.com/Products/Vegetables

So, ever since developers started building dynamic pages and confusing users and search engines, people have been trying to find a way to get the best of both worlds. One of the most common solutions is URL rewriting. URL rewriting is where a user can request a page via the user-friendly URL:

http://www.MyVirtualGroceryStore.com/Products/Fruit

and the Web server figures out to actually use the the script located at:

http://www.MyVirtualGroceryStore.com/Products/Category.aspx?Category=Fruit

to build and return the resulting Web page.

Introducing Microsoft URL Rewrite Module for IIS 7.0:

The first step is to make sure you can use the module. You’ll need to make sure you’re running IIS 7.0 or later (which means Windows Server 2008 or Vista). You’ll also need interactive access to the server to run the install routine. If you meet the above requirements, you can download the version of the module that matches your server’s platform from the IIS 7.0 Web site:

image  image image

Via 15 Seconds : Using the Microsoft URL Rewrite Module for IIS 7.0