.NET Url rewrite the root url

扶醉桌前 提交于 2019-12-05 13:01:39

I fixed it by adding the following rule:

 <rule name="Index Request" enabled="true" stopProcessing="true">
     <match url="^$" />
     <action type="Rewrite" url="index.aspx" logRewrittenUrl="true" />
 </rule>

Why not just setup a canonical name (CName) on your DNS server to automatically redirect http://domain.com to http://www.domain.com?

See the CName explanation on wikipedia

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!