Google bot .net 和 AspxAutoDetectCookieSupport 困境
我有一个 .net 移动网站,我在其中使用会话状态,并且由于移动网络/电话的性质(并非全部支持会话 cookie),我必须使用
<sessionState cookieless="AutoDetect"/>
它工作正常,但因为每个新会话都使用“AspxAutoDetectCookieSupport=1”重定向,所以我有感觉谷歌不会喜欢这样。
这是我的服务器日志中的一个小样本,
supportForumReadTopic.aspx id=38 80 - 66.249.71.80 Mozilla/5.0+(compatible;+Googlebot/2.1;++http://www.google.com/bot.html) 302
supportForumReadTopic.aspx id=38&AspxAutoDetectCookieSupport=1 Mozilla/5.0+(compatible;+Googlebot/2.1;++http://www.google.com/bot.html) 200
正如您所看到的,来自 google 的每个新点击都会获得 302。我有一个 genericmozilla5.browser 文件,其中我将 google bot 定义为支持 cookie 的浏览器,以便让 .net 不使用 cookieless url,但不确定这个 302 对我有何影响。
有人有类似经历吗?有什么想法吗?建议?
谢谢
i have a .net mobile web site where i use sesion state and due to nature of mobile networks/phones (not all supports session cookies) i had to use
<sessionState cookieless="AutoDetect"/>
It works fine but because each new session redirected with "AspxAutoDetectCookieSupport=1" i have a feeling that google won't like this.
Here is a small sample from my server logs
supportForumReadTopic.aspx id=38 80 - 66.249.71.80 Mozilla/5.0+(compatible;+Googlebot/2.1;++http://www.google.com/bot.html) 302
supportForumReadTopic.aspx id=38&AspxAutoDetectCookieSupport=1 Mozilla/5.0+(compatible;+Googlebot/2.1;++http://www.google.com/bot.html) 200
As you see each new hit from google will get 302 to itself. I have a genericmozilla5.browser file where i define google bot as cookie supporting browser in order to get .net not to use cookieless urls but not sure how this 302 would effect me.
Any one had smilar exprience? Any ideas? Suggestions?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚遇到了同样的问题,你是对的,谷歌对重定向不满意。您可以使用 wget 进行确认:
这将导致重定向循环。
我的解决方案可能是关闭 cookieLess 会话,因为我真的不需要它。如果您确实必须支持没有 cookie 的浏览器,另一种解决方案可能是始终使用 cookieLess 会话。这至少可以解决问题,尽管你的 URL 会很难看。
I just bumped into the same problem, and you are correct, Google is not happy about the redirects. You can confirm it with wget:
This will lead to a redirection loop.
My solution will probably be to turn off the cookieLess sessions, since I don't really need it. Another solution might be to always use cookieLess sessions, if you really have to support browsers without cookies. This will at least solve the problem, although your URLs will be ugly.