IIS7 URL Rewrite
Posted by: Matthew on Wednesday, April 28, 2010
I figured out how to do this today, it’s super simple so I though I’d share how you can do it.
Basically we’re going to make some changes in the web.config file, you need to make sure that IIS7 has the URL Rewrite module installed or else this wont work, I use the Rackspace Cloud and it is installed there by default.
We are going to use the following example:
http://www.domain.com/article.aspx?id=1?title=urlRewrite
rewritten to become:
web.config
Place the following between the <system.webServer> </system.webServer> section of your web.config file:
<rules>
<rule name="Article URLS">
<match url="article^([0-9]+)/([_0-9a-z-]+)"/>
<action type="Rewrite" url="article.aspx?id={R:1}&title={R:2}"/>
</rule>
</rules>
And it’s done, it is really that easy.
Now all you need to do is edit your application so that it spits out the new URL format, unlike LinkFreeze you have to do it all manually.
I hope that helps people who are looking for a simple example some of the official stuff is confusing.
Read More blog comments powered by DisqusSocial
Latest Posts
- mixcraft 6
- install asp.net session state sql db
- optus galaxy tab apn settings
- the big nerd ranch guide, xcode 4.2 and mainwindow.xib
- skyrim, oh skyrim
- earth from space - time lapse
- call of duty - modern warfare 3
- major interface updates, and keeping clients happy
Recent Tweets
-
<----- TWEETS ----->
Categories
- acoustica mixcraft 5 (3)
- building a synth (0)
- fun things (24)
- galaxy tab (2)
- gaming (3)
- life (3)
- music production (2)
- programming (4)
- technology (2)
