为什么 rev 规范链接总是使用 302 重定向
某些网站支持自托管短网址的 RevCanonical 链接。例如 flickr、php.net、dopplr。
据我了解,一些文章也说。 URL 缩短服务应使用 301 永久重定向而不是 302。
但是我上面列出的所有网站都对其 RevCanonical 链接使用 302 临时重定向。
以下是我使用 curl -I
Dopplr 得到的一些结果:
> curl -I http://dplr.it/explore/0xd1 [0:57]
HTTP/1.1 302 Moved Temporarily
Server: nginx/0.5.33
Date: Fri, 04 Mar 2011 17:21:33 GMT
Content-Type: text/html
Content-Length: 161
Connection: keep-alive
Location: http://www.dopplr.com/dplrit/explore/0xd1
Flickr:
> curl -I http://flic.kr/p/9m9Cmj [1:21]
HTTP/1.1 302 Found
Date: Fri, 04 Mar 2011 17:29:43 GMT
Server: Apache
P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"
Location: http://www.flickr.com/photo.gne?short=9m9Cmj
....
我不明白为什么这种情况(自主机缩短 URL)应该使用 302 重定向。谁能解释一下原因吗?
Some sites supports RevCanonical link for self hosting short URL. Such as flickr, php.net, dopplr.
For my understand and some articles also said that. URL shorten service should use 301 permanent redirect instead of 302.
But all the websites I lists above is using 302 temporarily redirect for their RevCanonical link.
Here are some result I got using curl -I
Dopplr:
> curl -I http://dplr.it/explore/0xd1 [0:57]
HTTP/1.1 302 Moved Temporarily
Server: nginx/0.5.33
Date: Fri, 04 Mar 2011 17:21:33 GMT
Content-Type: text/html
Content-Length: 161
Connection: keep-alive
Location: http://www.dopplr.com/dplrit/explore/0xd1
Flickr:
> curl -I http://flic.kr/p/9m9Cmj [1:21]
HTTP/1.1 302 Found
Date: Fri, 04 Mar 2011 17:29:43 GMT
Server: Apache
P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"
Location: http://www.flickr.com/photo.gne?short=9m9Cmj
....
I don't understand why this case(self host shorten URL) should use 302 redirect. Can anyone explain the reason?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如 Franz 在上面指出的那样,在这种特殊情况下,302 并不是一个好的决定。
马特·卡茨 (Matt Cutts) 正在讨论您的确切问题:
http://www.mattcutts.com/blog/goo-gl-url-缩短器/
As Franz also notes above, in this particular case, 302 is not a good decision.
Here is Matt Cutts discussing your exact question:
http://www.mattcutts.com/blog/goo-gl-url-shortener/