I have a website hosted on IIS7 and i would like to impliment url rewriting on it
My current URL blog.mysite.com/article.aspx?name=marriage
I want to rewrite it to
blog.mysite.com/marriage
I tried some rules but nothing giving the perfect solution.
Please share your ideas and would be helpful for me
thank you all
shibin
Assuming you are using Microsoft Rewrite 2.0 then your pattern would be:
^([^/]+)/?$
And your rewrite URL would be:
article.aspx?name={R:1}
To just simple redirect from the new url scheme to the old put this in the system.webserver section of your web.config:
To also do redirects from the old to the new url, so the old urls will automatically update to the new scheme, and to include processing which will rewrite your html output to use the new url scheme you can replace the above with: