【发布时间】:2010-12-23 15:03:18
【问题描述】:
我们已将旧的 ASP 网站移植到 SharePoint 并竭尽全力保持网站结构不变,唯一的变化是将扩展名从 .asp 更改为 .aspx。我们 301 重定向到等效的 .aspx 页面的所有 .asp 请求。
问题是 Google 不尊重 301 重定向的页面排名。这导致了一个重大问题。所以想知道是否有办法接受 .asp 页面的请求并发布 SharePoint .aspx 页面但保持 url 不变,即没有 301 重定向。
谢谢。
【问题讨论】:
-
感谢 SPDoctor 的建议。我们最终设法非常简单地解决了它。在我们自定义的 httpmodule 中,在 context.beginrequest 事件处理程序中,我们没有执行 301 重定向,而是简单地执行 HttpContext.Current.RewritePath 到等效的 .aspx 页面。这基本上是 Scott Guthrie 的博文 weblogs.asp.net/scottgu/archive/2007/02/26/… 中的技巧 2。
标签: sharepoint asp-classic url-rewriting migration http-status-code-301