当前位置: 动力学知识库 > 问答 > 编程问答 >

asp.net - Does <httpRedirect> in web.config work in a mono setup? Or is it IIS7 specific?

问题描述:

We had some content restructure recently and I'd like to put in some redirect rules into web.config so bookmarks to the old pages can get routed to their new locations/pages.

I tried using this approach:

<location path="~/product/productA.aspx">

<system.webServer>

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

</system.webServer>

</location>

But all I'm getting when I go to "http://www.oursite.com/product/productA.aspx" is our http 404 page.

Am I doing something wrong, or is the httpRedirect tag in web.config not supported in mono?

Thank you :)

网友答案:

is an IIS 7 specific tag, so you should not expect it work for any other platforms. No IIS 5/6, and no Mono.

分享给朋友:
您可能感兴趣的文章:
随机阅读: