IIS7.5 web.config重定向被忽略

时间:2016-06-16 10:08:42

标签: asp.net url-redirection

我在web.config中有以下httpredirect被忽略。此web.config位于混合Webforms和MVC Web应用程序的根目录下。以下示例中的两个位置都是webforms页面。

<configuration>
<system.webServer>
    <httpRedirect enabled="true" exactDestination="true" httpResponseStatus="Permanent">
      <add wildcard="*/foldername/" destination="/anotherfolder/file.aspx" />
    </httpRedirect>
  </system.webServer>
</configuration>

这是在localhost btw上,但httpredirect应该在localhost和live服务器上运行。我做错了什么?

注意:Web上有很多指向URL Rewrite IIS模块的说明。我不能在实时服务器上安装它,所以这不是一个选项。

1 个答案:

答案 0 :(得分:1)

https://www.iis.net/configreference/system.webserver/httpredirect

对于未来的任何人。从上面的链接安装检查模块。

相关问题