【问题标题】:Does <httpRedirect> in web.config work in a mono setup? Or is it IIS7 specific?web.config 中的 <httpRedirect> 是否在单声道设置中工作?还是 IIS7 特定的?
【发布时间】:2011-02-17 22:59:05
【问题描述】:

我们最近进行了一些内容重组,我想在 web.config 中加入一些重定向规则,以便旧页面的书签可以路由到它们的新位置/页面。

我尝试使用这种方法:

<location path="~/product/productA.aspx">
    <system.webServer>
        <httpRedirect enabled="true" destination="~/product/category/productA.aspx" exactDestination="false" childOnly="true" httpResponseStatus="Permanent" />
    </system.webServer>
</location>

但是当我转到“http://www.oursite.com/product/productA.aspx”时,我得到的只是我们的 http 404 页面。

是我做错了什么,还是单声道不支持 web.config 中的 httpRedirect 标记?

谢谢你:)

【问题讨论】:

    标签: asp.net redirect mono web-config


    【解决方案1】:

    是 IIS 7 特定的标记,因此您不应期望它适用于任何其他平台。没有 IIS 5/6,也没有 Mono。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-02-27
      • 1970-01-01
      • 1970-01-01
      • 2019-08-23
      • 1970-01-01
      • 1970-01-01
      • 2016-09-13
      相关资源
      最近更新 更多