【发布时间】:2011-03-09 07:21:40
【问题描述】:
我将我的网站从 asp 升级到了 asp.net。 这意味着我以前的所有 asp 文件都已过时。 我不想丢失旧页面的 Google 排名。
什么是正确的重定向方式? 我试图捕捉所有旧的asp页面是我的404然后到:
if Request.QueryString("aspxerrorpath").contains("index.asp") = true then
Response.Status = "301 Moved Permanently"
Response.AddHeader("Location", "http://www.domain.com/index.aspx")
Response.Redirect("/index.aspx")
end if
但它不捕捉asp页面,只捕捉aspx。
【问题讨论】:
标签: asp.net asp-classic seo http-redirect