How to remove the www. prefix in ASP.NET MVC
问题 How do I remove the www. from incoming requests? Do I need to setup a 301 redirect or simply just rewrite the path? Either way, what's the best way to do it? Thanks! 回答1: I believe it would be more appropriate to do that with IIS' URL rewriting module. If you have access to IIS' management tool, there's a GUI to set up rewrite rules, in the "IIS" section of your site's settings. If you choose "Add Rule(s)..." from there (in the right column menu), choose the "Canonical domain name" rule in