当在临时重定向(HTTP 302),一个url结果得到什么索引? [英] When a url results in a temporary redirect (http 302), what gets indexed?

查看:190
本文介绍了当在临时重定向(HTTP 302),一个url结果得到什么索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使我们的(非常沉重基于AJAX)的网站搜索引擎更友好。

I'm trying to make our (very heavily AJAX based) website more search engine friendly.

我们有一个系统,其中某些URL重定向到主页设置会话变量改变主网页的行为之后。这是通过使用Controller.Redirect方法创建一个ActionResult acheived

We have a system where certain urls redirect to the main page after setting session variables to change the behavior of the main page. This is acheived using the Controller.Redirect method to create an ActionResult.

因此​​,举例来说,主要的网页是:

So for instance, the main page is:

http://radiotuna.com

但如果我们想链接到一个电台,我们使用:

but if we want to link to a radio station, we use:

http://radiotuna.com/s/66258

其重定向到主页。然而,在这种情况下,所显示的内容是不同的,由于其被之前重新导向设置会话变量

which redirects to the main page. However in this case, the displayed content is different due to Session variables that were set prior to the redirect.

什么会被网络爬虫索引时,这个psented $ P $重定向?

What will be indexed by web crawlers when presented with this redirect?

威尔会议上在这种情况下,preserved?

Will Session be preserved in this case?

据我可以告诉有几个可能的结果:

As far as I can tell there are a few possible outcomes:


  1. 履带式如下重定向,会话信息是preserved,爬与 http://radiotuna.com相关的数据/ S / 66258 (期望的结果)

  2. 履带不跟随重定向。如果我们可以发送一个页面与302,这是OK十岁上下。这是允许的?

  3. 履带式如下重定向,会话信息是preserved,爬与 http://radiotuna.com/(坏)

  4. 履带式如下重定向,但会话信息被丢弃,所以主(未修改页)与 HTTP相关:// radiotuna .COM / S / 66258 (坏)

  1. crawler follows redirect, session info is preserved, crawled data is associated with http://radiotuna.com/s/66258 (the desired outcome)
  2. crawler does not follow redirect. If we can send a page with the 302, this is OK-ish. Is this permitted?
  3. crawler follows redirect, session info is preserved, crawled data is associated with http://radiotuna.com/ (bad)
  4. crawler follows redirect, but session info is discarded, so main (unmodified page) is associated with http://radiotuna.com/s/66258 (bad)

也许一个302错误状态送回去。也许在这种情况下,使用重定向的想法是有缺陷的。任何人都可以告诉我吗?

Perhaps a 302 is the wrong status to send back. Perhaps the idea of using redirects in this case is flawed. Can anyone enlighten me?

编辑:我们为什么要这样做呢?理想情况下,我们希望只有一个URL出现在地址栏,所以我们希望始终重定向到主页。当从重定向进来,这将导致不同的标题和meta描述,这是这一点,我们希望通过履带被拾起和相关兑pre-重定向URL。

Why are we doing this? Ideally we'd like only a single URL to appear in the address bar, so we'd like to always redirect to the main page. When coming in from a redirect, this would result in a different title and meta description and it is this that we'd like to be picked up by the crawler and associated against the pre-redirect url.

EDIT2:它会更好检测,如果我们被一个履带式打击,并没有重定向在这种情况下提供的页面?有人可能会如何检测履带的客户呢?

Would it be better to detect if we're being hit by a crawler and to deliver the page without redirect in this case? How might one detect crawler clients?

推荐答案

感谢您的答案大家。这里的大监督是会话使用的SessionID cookie,它,除非我错了,将无法使用,当爬虫前来参观preserved。回到绘图板。

Thanks for the answers everyone. The big oversight here is that Session is preserved using the sessionid cookie, which, unless I'm mistaken, will not be available when the crawlers come to visit. Back to the drawing board.

这篇关于当在临时重定向(HTTP 302),一个url结果得到什么索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆