HTTP 模块导致 Google 缓存出现问题

发布于 2024-10-16 03:54:58 字数 220 浏览 7 评论 0原文

我有一个实时网站(我无法提供 URL)。 它位于 sharepoint 2007 上。这些页面有一个 URL,后来进行了修改。 我编写了一个 http 模块并使用 response.redirect() 将用户导航到正确的页面。

但由于该网站之前已上线;在 google.com 上搜索时,它仅显示旧网址。尽管重定向效果很好。我需要将缓存的 URL 更改为新 URL。

我怎样才能做到这一点?

I have a live site ( I can't provide the URL ).
It is on sharepoint 2007. The pages were having a URL, later that was modified.
I wrote a http module and used response.redirect() to navigate user to the correct page.

But since the site was live previously; on searching on google.com, it shows the old URL only. Though the redirection works fine. I need to change the cached URL to new URL.

How can I do that ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

好久不见√ 2024-10-23 03:54:58

您需要了解不同的重定向代码 - response.redirect() 本身只是将浏览器(或机器人)重定向到另一个地址。

您应该发出 301 重定向 那么谷歌和其他服务(据说城里还有其他一些游戏)最终会删除旧的 URL 并替换为新的 URL,并且您所有的“链接汁”将被保留。

如果您需要更改某个网址
页面与搜索引擎中显示的一样
结果,我们建议您使用
服务器端 301 重定向。这是
确保用户和
搜索引擎被定向到
正确的页面。 301状态码
意味着页面永久存在
搬到新地点。

用于此的 ASP.NET 代码

Response.Status = "301 Moved Permanently" 
Response.addheader "Location", "http://www.newdomain.com/newurl/" 
Response.end

You need to understand the different redirect codes - by itself response.redirect() just redirects a browser (or bot) to another address.

You should have been issuing a 301 redirect then Google and other services (its been roumered that there are a few other games in town) would have eventually removed the old URL and replaced with the new URL and all your 'link juice' would be kept.

If you need to change the URL of a
page as it is shown in search engine
results, we recommended that you use a
server-side 301 redirect. This is the
best way to ensure that users and
search engines are directed to the
correct page. The 301 status code
means that a page has permanently
moved to a new location.

ASP.NET code for this

Response.Status = "301 Moved Permanently" 
Response.addheader "Location", "http://www.newdomain.com/newurl/" 
Response.end
倒带 2024-10-23 03:54:58

请尝试此处查看。不确定,但它可以帮助你。

Try to look here. Not sure, but it can help you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文