开发者

Redirect from Default.aspx to root using IIS7

开发者 https://www.devze.com 2023-01-04 00:46 出处:网络
When request comes to www.example.com/default.aspx, I want it to 301 to www.example.com. How to do that?

When request comes to www.example.com/default.aspx, I want it to 301 to www.example.com. How to do that?

PS - 开发者_开发知识库I tried many rules but nothing seems to work. Thanks.


Have you tried using URL Rewrite with the following rule:

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号