【发布时间】:2014-02-04 14:14:49
【问题描述】:
我需要通过 web.config 文件将一些旧链接从我们的旧网站重定向到我们的新网站。 到目前为止,我已经设置了这个,但它会在我们的网站上导致 500 错误。
这是 web.config :
<location path="about.aspx">
<system.webServer>
<httpRedirect enabled="true" destination="http://www.ite-exhibitions.com/About" httpResponseStatus="Permanent" />
</system.webServer>
</location>
<location path="investor_relations.aspx">
<system.webServer>
<httpRedirect enabled="true" destination="http://www.ite-exhibitions.com/Investor-Relations" httpResponseStatus="Permanent" />
</system.webServer>
</location>
<location path="events.aspx">
<system.webServer>
<httpRedirect enabled="true" destination="http://www.ite-exhibitions.com/Event-Calendar" httpResponseStatus="Permanent" />
</system.webServer>
</location>
也尝试将其更新为此,但仍然没有乐趣。有人有什么想法吗?
【问题讨论】:
-
是的,问题是它在应用于 web.config 时会出现 500 错误。它应该去一个特定的地方吗?还是这个语法错误?
标签: asp.net iis-7 asp-classic web-config