[英]How do I Redirect page.ASPX to / in MVC5
We have rewritten our app in MVC5 and there is a new homepage " http://server/ ". 我们已经在MVC5中重写了我们的应用程序,并且有了一个新的主页“ http:// server / ”。
People have bookmarked our old homepage " http://server/App.aspx " and their links are now broken. 人们已经在我们的旧主页“ http://server/App.aspx ”中添加了书签,现在他们的链接已断开。
What do I do to redirect " http://server/App.aspx " to " http://server/ " 如何将“ http://server/App.aspx ”重定向到“ http:// server / ”
TIA! TIA!
You can use the IIS rewrite module if it installed. 您可以使用IIS重写模块(如果已安装)。 All you need to do is add this to the
system.webServer
node in the web.config. 您需要做的就是将其添加到web.config中的
system.webServer
节点。
<rewrite>
<rules>
<rule name="rule1" stopProcessing = "true" >
<match url="App.aspx" />
<action type="Redirect" url="/" appendQueryString="false" />
</rule>
</rules>
</rewrite>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.