Iis 7 使用IIS7从Default.aspx重定向到root

Iis 7 使用IIS7从Default.aspx重定向到root,iis-7,url-rewriting,redirect,Iis 7,Url Rewriting,Redirect,当请求到达www.example.com/default.aspx时,我希望它是301到www.example.com。怎么做 PS-我尝试了很多规则,但似乎没有任何效果。谢谢。您是否尝试过使用URL重写和以下规则: <rule name="Default Document" stopProcessing="true"> <match url="(.*)default.aspx" /> <action type="Redirect" url="{R:1}

当请求到达www.example.com/default.aspx时,我希望它是301到www.example.com。怎么做


PS-我尝试了很多规则,但似乎没有任何效果。谢谢。

您是否尝试过使用URL重写和以下规则:

<rule name="Default Document" stopProcessing="true"> 
  <match url="(.*)default.aspx" /> 
  <action type="Redirect" url="{R:1}" redirectType="Permanent" /> 
</rule> 

您是否尝试使用URL重写,并遵循以下规则:

<rule name="Default Document" stopProcessing="true"> 
  <match url="(.*)default.aspx" /> 
  <action type="Redirect" url="{R:1}" redirectType="Permanent" /> 
</rule>