【发布时间】:2011-02-02 13:20:28
【问题描述】:
我需要在 IIS 下运行的 ASP.NET MVC 应用程序的 web.config 中设置一些 301 永久重定向。
最简单的方法是在 web.config 文件中添加类似于下面的标签:
<location path="TheMenu.aspx">
<system.webServer>
<httpRedirect enabled="true" destination="menus/" httpResponseStatus="Permanent" />
</system.webServer>
</location>
当我访问http://domain.com/TheMenu.aspx 的站点时,它会将我重定向到http://domain.com/menusxd 而不是http://domain.com/menus。
这是什么原因造成的?
【问题讨论】:
标签: asp.net-mvc iis-7 web-config