南希模块中的永久(301)重定向

时间:2016-05-09 21:12:52

标签: redirect module http-status-code-301 nancy

我正在南希重新写一个旧网站。

我有很多这样的旧网址:/thepagename.aspx

我想知道为什么我无法在模块中处理这样的遗留网址?

Get["/theoldpagename.aspx"] = _ => Response.AsRedirect("~/new-page-name")
            .WithStatusCode(HttpStatusCode.MovedPermanently);

在主机上我没有IIS的完全访问权限,但我可以在web.config中执行此操作。 我有什么理由不做上述事情吗?

0 个答案:

没有答案