I am using ASP.NET 2.0 C#. I want to redirect all request for my web app with \"www\" to without \"www\"
www.example.com to example.com
Or
example.co
There's a Stackoverflow blog post about this.
http://blog.stackoverflow.com/2008/06/dropping-the-www-prefix/
Quoting Jeff:
Here’s the IIS7 rule to remove the WWW prefix from all incoming URLs. Cut and paste this XML fragment into your web.config file under
/ / Or, if you prefer to use the www prefix, you can do that too: