Asp.net mvc 2 301使用web.config将表单aspx重定向到mvc页面

Asp.net mvc 2 301使用web.config将表单aspx重定向到mvc页面,asp.net-mvc-2,http-status-code-301,Asp.net Mvc 2,Http Status Code 301,首先,我搜索了这么多,谷歌没有运气 我正在尝试将现有表单网站Product.aspx页面重定向到新版本网站的新MVC2.net页面 我希望使用web.config实现这一点,如下所示: <location path="Products.aspx"> <system.webServer> <httpRedirect enabled="true" destination="http://www.address.com/Products/Page" exactDest

首先,我搜索了这么多,谷歌没有运气

我正在尝试将现有表单网站Product.aspx页面重定向到新版本网站的新MVC2.net页面

我希望使用web.config实现这一点,如下所示:

<location path="Products.aspx">
<system.webServer>
  <httpRedirect enabled="true" destination="http://www.address.com/Products/Page" exactDestination="true" httpResponseStatus="Permanent" />
</system.webServer>

我相信location path=中指定的页面需要实际存在,而新mvc网站中没有这样的页面


有什么方法可以实现吗?

您的代码看起来不错。只是
部分仅由IIS 7.0及更高版本读取和解释。它不能与Cassini或IIS 6.0一起使用。

是的,我正在Web服务器上进行测试,但是如果该页面在我的项目中不存在,它会有什么不同吗?