{"id":2007,"date":"2024-06-05T20:17:21","date_gmt":"2024-06-05T12:17:21","guid":{"rendered":"https:\/\/cn.raksmart.com\/blog\/host\/3805.html"},"modified":"2024-06-05T20:17:21","modified_gmt":"2024-06-05T12:17:21","slug":"http%e7%8a%b6%e6%80%81%e7%a0%81-301%e3%80%81302%e3%80%81307-%e7%9a%84%e5%8c%ba%e5%88%ab","status":"publish","type":"post","link":"https:\/\/cn.raksmart.com\/blog\/knowledge\/cjwt\/2007.html","title":{"rendered":"HTTP\u72b6\u6001\u7801 301\u3001302\u3001307 \u7684\u533a\u522b"},"content":{"rendered":"<div class=\"entry-content e-content\" itemprop=\"description articleBody\">\n<p>\u5728\u5f00\u59cb\u63a5\u89e6\u7f51\u7ad9 SEO \u7684\u65f6\u5019\uff0c\u7ecf\u5e38\u4f1a\u542c\u5230\u6709\u4eba\u8bf4 301 \u91cd\u5b9a\u5411\u597d\uff0c\u53ef\u4ee5\u4f20\u9012\u6743\u91cd\uff0c302 \u6ca1\u7528\u3002\u4e4b\u524d\u4e00\u76f4\u90fd\u662f\u53ea\u542c\u522b\u4eba\u8fd9\u4e48\u8bf4\uff0c\u4f46\u662f\u4ece\u6765\u90fd\u6ca1\u6709\u6df1\u5165\u7684\u4e86\u89e3\u8fc7301\u548c302\u7684\u533a\u522b\uff0c\u4ee5\u53ca\u4e3a\u4ec0\u4e48\u4f1a\u6709\u8fd9\u79cd\u8bf4\u6cd5?\u8fd9\u79cd\u8bf4\u6cd5\u5230\u5e95\u5bf9\u4e0d\u5bf9?<a href=\"https:\/\/www.raksmart.com\/cps\/7821\" target=\"_blank\" rel=\"noopener\">raksmart<\/a><a href=\"https:\/\/cn.raksmart.com\/\" target=\"_blank\" rel=\"noopener\"><strong>\u8377\u5170\u670d\u52a1\u5668<\/strong><\/a>\u4e3a\u60a8\u5206\u4eabHTTP\u72b6\u6001\u7801 301\u3001302\u3001307 \u7684\u533a\u522b\uff1a<\/p>\n<p>301 \u6c38\u4e45\u91cd\u5b9a\u5411<\/p>\n<p>301 Move Permanently \u662fHTTP\u534f\u8bae\u4e2d\u7684\u4e00\u4e2a\u72b6\u6001\u7801\u3002\u53ef\u4ee5\u7b80\u5355\u5730\u7406\u89e3\u4e3a\u8be5\u8d44\u6e90\u5df2\u7ecf\u88ab\u6c38\u4e45\u6539\u53d8\u4e86\u4f4d\u7f6e\uff0c\u901a\u5e38\u4f1a\u53d1\u9001HTTP Location\u6765\u91cd\u5b9a\u5411\u5230\u6b63\u786e\u7684\u65b0\u4f4d\u7f6e\u3002\u63a8\u8350\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/website\/seo\/821.html\" target=\"_blank\" rel=\"noopener\">\u300a\u4ec0\u4e48\u662f\u91cd\u5b9a\u5411\u300b<\/a><\/p>\n<p>\u4e3e\u4e2a\u4f8b\u5b50\u6765\u770b\uff1asample.com\/a 301 \u5230 sample.com\/b<\/p>\n<p>\u56e0\u4e3a\u662f 301 \u6c38\u4e45\u91cd\u5b9a\u5411\uff0c\u8fd9\u4e2a\u610f\u601d\u5c31\u662f a \u94fe\u63a5\u5df2\u7ecf\u6ca1\u6709\u5b58\u5728\u7684\u610f\u4e49\u4e86\uff0c\u4ed6\u6240\u6709\u7684\u4ef7\u503c\u90fd\u4f1a\u5bfc\u5411\u7ed9 b\u3002<\/p>\n<p>\u6240\u4ee5\u5bf9\u4e8e\u641c\u7d22\u5f15\u64ce\u6765\u8bf4 b \u94fe\u63a5\u5c31\u662f a \u94fe\u63a5\u4e86\u73b0\u5728\u3002\u6240\u4ee5 a \u94fe\u63a5\u7684\u6743\u91cd\u4f1a\u76f4\u63a5\u4f20\u9012\u7ed9 b \u94fe\u63a5\u3002\u8fd9\u4e5f\u5c31\u662f\u5e38\u8bf4\u7684 301 \u5bf9 SEO \u6709\u597d\u5904\u7684\u539f\u56e0\u3002<\/p>\n<p>\u800c\u4e14 301 \u4e5f\u662f\u8c37\u6b4c\u5b98\u65b9\u8ba4\u4e3a\u662f\u5c06\u7f51\u7ad9\u5730\u5740\u7531 HTTP \u8fc1\u79fb\u5230 HTTPS \u7684\u6700\u4f73\u65b9\u6cd5\u3002<\/p>\n<p>302 Found<\/p>\n<p>302 Found\uff0c\u539f\u59cb\u63cf\u8ff0\u77ed\u8bed\u4e3a Moved Temporarily\uff0c\u662fHTTP\u534f\u8bae\u4e2d\u7684\u4e00\u4e2a\u72b6\u6001\u7801(Status Code)\u3002\u53ef\u4ee5\u7b80\u5355\u7684\u7406\u89e3\u4e3a\u8be5\u8d44\u6e90\u539f\u672c\u786e\u5b9e\u5b58\u5728\uff0c\u4f46\u5df2\u7ecf\u88ab\u4e34\u65f6\u6539\u53d8\u4e86\u4f4d\u7f6e;\u6362\u800c\u8a00\u4e4b\uff0c\u5c31\u662f\u8bf7\u6c42\u7684\u8d44\u6e90\u6682\u65f6\u9a7b\u7559\u5728\u4e0d\u540c\u7684 URI \u4e0b\uff0c\u6545\u800c\u9664\u975e\u7279\u522b\u6307\u5b9a\u4e86\u7f13\u5b58\u5934\u90e8\u6307\u793a\uff0c\u8be5\u72b6\u6001\u7801\u4e0d\u53ef\u7f13\u5b58\u3002<\/p>\n<p>302 \u662f\u6700\u5e38\u89c1\u7684\u4e00\u79cd\u91cd\u5b9a\u5411\u65b9\u6cd5\uff0c\u4f46\u540c\u65f6\u4e5f\u662f\u73b0\u5b9e\u4e0e\u6807\u51c6\u76f8\u77db\u76fe\u7684\u5178\u578b\u6848\u4f8b\u3002<\/p>\n<p>\u89c4\u8303\u4e2d\u89c4\u5b9a 302 \u91cd\u5b9a\u5411\u4e0d\u5141\u8bb8\u4fee\u6539\u8bf7\u6c42\u65b9\u5f0f\u3002\u4e5f\u5c31\u662f\u5f53\u4e00\u4e2a POST \u8bf7\u6c42\u8fd4\u56de\u4e86 302 \u65f6\uff0c\u6309\u7167\u89c4\u8303\u4ecd\u7136\u5e94\u8be5\u4f7f\u7528 POST \u8bf7\u6c42\u6253\u5f00\u54cd\u5e94\u5934\u4e2d Location \u4e2d\u7684 URl\u3002<\/p>\n<p>\u4f46\u5404\u5bb6\u6d4f\u89c8\u5668\u5382\u5546\u5728\u5b9e\u73b0\u7684\u65f6\u5019\u5e76\u6ca1\u6709\u9075\u5b88\u8fd9\u4e2a\u89c4\u8303\uff0c\u800c\u662f\u4f7f\u7528 GET \u65b9\u5f0f\u8bbf\u95ee\u670d\u52a1\u7aef\u54cd\u5e94\u5934\u4e2d\u7684 Location \u4e2d\u7684 URI\u3002<\/p>\n<p>\u5404\u5bb6\u6d4f\u89c8\u5668\u5382\u5546\u7684\u8fd9\u79cd\u64cd\u4f5c\u95f4\u63a5\u7684\u63a8\u52a8 HTTP 1.1 \u6807\u51c6\u89c4\u8303\u4e2d\u63a8\u51fa\u4e86 303 \u548c 307\uff0c\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002\u4e8b\u5b9e\u4e0a\uff0c\u73b0\u5728\u5927\u5bb6\u518d\u8bf4\u7684 302 \u5176\u5b9e\u5c31\u662f\u6807\u51c6\u89c4\u8303\u4e2d\u7684 303\u3002<\/p>\n<p>303 See Other<\/p>\n<p>303 See Other \uff0c\u81ea RFC 2616 (HTTP 1.1)\u8d77\uff0c\u7528\u4e8e\u5728\u6536\u5230 HTTP POST \u8bf7\u6c42\u4e4b\u540e\uff0c\u8fdb\u884c URL \u91cd\u5b9a\u5411\u7684\u64cd\u4f5c\u3002<\/p>\n<p>\u5373\u65e0\u8bba\u539f\u8bf7\u6c42\u662f GET \u8fd8\u662f POST\uff0c\u5ba2\u6237\u7aef\u6536\u5230\u670d\u52a1\u7aef\u7684\u54cd\u5e94\u540e\uff0c\u5fc5\u987b\u4f7f\u7528 GET \u65b9\u6cd5\u91cd\u5b9a\u5411\u5230\u65b0\u5730\u5740\u3002\u63a8\u8350\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/website\/wordpress\/1999.html\" target=\"_blank\" rel=\"noopener\">\u300a\u5982\u4f55\u5728WordPress\u4e2d\u521b\u5efa301\u91cd\u5b9a\u5411\uff1f\u300b<\/a><\/p>\n<p>307 Temporary Redirect<\/p>\n<p>307 Temporary Redirect \u53ef\u4ee5\u7406\u89e3\u4e3a\u4e00\u4e2a\u4e34\u65f6\u7684\u91cd\u5b9a\u5411\u3002<\/p>\n<p>307 \u548c 302 \u91cd\u5b9a\u5411\u533a\u522b\u5728\u4e8e\uff0c307 \u7ea6\u5b9a\u5ba2\u6237\u7aef\u91cd\u5b9a\u5411\u4e4b\u540e\u4e0d\u80fd\u6539\u53d8\u539f\u5148\u7684\u8bf7\u6c42\u65b9\u6cd5\u3002<\/p>\n<p>302 \u5e76\u4e0d\u662f\u4e34\u65f6\u91cd\u5b9a\u5411<\/p>\n<p>\u5f53\u4e86\u89e3\u4e86 301\u3001302\u3001303\u3001307 \u8fd9\u4e9b\u6982\u5ff5\u4e4b\u540e\uff0c\u4f60\u53ef\u80fd\u4f1a\u53d1\u73b0\u4e4b\u524d\u81ea\u5df1\u7684\u7406\u89e3\u6839\u672c\u5c31\u4e0d\u5bf9\u3002<\/p>\n<p>302 \u5176\u5b9e\u5e76\u4e0d\u662f\u91cd\u5b9a\u5411\uff0c\u5b9e\u9645\u4e0a 302 \u7684\u54cd\u5e94\u72b6\u6001\u7801\u53ea\u662f\u4ee3\u8868\u4e86\u201c\u5185\u5bb9\u5df2\u7ecf\u88ab\u79fb\u8d70\u201d\uff0c\u9664\u975e\u54cd\u5e94\u5934\u4e2d\u5305\u542b\u4e86\u4e00\u4e2a\u65b0\u7684 URL\uff0c\u5ba2\u6237\u7aef\u624d\u4f1a\u8fdb\u884c\u91cd\u5b9a\u5411\u3002<\/p>\n<p>303 \u624d\u662f\u7edd\u5927\u90e8\u5206 SEO \u4eba\u5458\u5634\u91cc\u7684 302\u3002\u800c\u4e14 303\/302 \u7684\u610f\u601d\u53ea\u662f \u201cSee Other\u201d\uff0c\u4e5f\u5c31\u662f\u4f60\u627e\u7684\u4e1c\u897f\u88ab\u79fb\u8d70\u4e86\uff0c\u8bfa\uff0c\u4f46\u662f\u6211\u7ed9\u4f60\u627e\u5230\u4e86\u3002\u5e76\u6ca1\u6709 redirect \u7684\u610f\u601d\u5728\u5176\u4e2d\u3002307 \u624d\u662f\u6b63\u5b97\u7684\u201d\u4e34\u65f6\u91cd\u5b9a\u5411\u201c\u3002<\/p>\n<p>\u77e5\u9053\u4e86\u8fd9\u4e9b\u6982\u5ff5\u6ca1\u6709\u7528\uff0c\u91cd\u8981\u7684\u5e94\u8be5\u662f\u5728\u6211\u4eec\u5efa\u7ad9\u8fc7\u7a0b\u4e2d\uff0c\u5c06\u8fd9\u4e9b\u77e5\u8bc6\u5e94\u7528\u8d77\u6765\u3002\u5426\u5219\u61c2\u4e86\u4e5f\u6ca1\u6709\u592a\u5927\u4f5c\u7528\uff0c\u5bf9\u5427?\u9664\u975e\u4f60\u8981\u7528\u8fd9\u4e2a\u8ddf\u522b\u4eba\u6495\u903c\u7528=\u3002=<\/p>\n<p>301 \u91cd\u5b9a\u5411\u6709\u4ec0\u4e48\u7f3a\u70b9?<\/p>\n<p>\u5982\u679c\u6709\u4eba\u8ddf\u4f60\u8bf4\u7f51\u7ad9 SEO \u91cd\u5b9a\u5411\u5fc5\u987b\u53ea\u80fd\u7528 301 \u7684\u8bdd\uff0c\u90a3\u4e48\u6211\u8d1f\u8d23\u4efb\u7684\u544a\u8bc9\u4f60\uff0c\u4ed6\u7684\u6280\u672f\u4e0d\u9760\u8c31\u3002<\/p>\n<p>301 \u91cd\u5b9a\u5411\u6709\u4e00\u4e2a\u5f88\u91cd\u8981\u7684\u7279\u6027\u5c31\u662f\u7f13\u5b58\uff0c\u4e5f\u5c31\u662f\u4e3a\u4ec0\u4e48 301 \u53eb\u6c38\u4e45\u91cd\u5b9a\u5411\u7684\u539f\u56e0\u3002<\/p>\n<p>\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u5047\u8bbe\u60a8\u672c\u6765\u662f\u5c06 me.com 301 \u5230 you.com\u3002\u4e00\u6bb5\u65f6\u95f4\u4e4b\u540e\u53c8\u51b3\u5b9a\u8981\u5c06 me.com 301 \u91cd\u5b9a\u5411\u5230 us.com\u3002\u90a3\u4e48\u540e\u6765\u7684\u8fd9\u4e2a\u64cd\u4f5c\u53ef\u80fd\u8981\u82b1\u5f88\u957f\u65f6\u95f4\u624d\u80fd\u751f\u6548\uff0c\u56e0\u4e3a\u641c\u7d22\u5f15\u64ce\u4f1a\u7f13\u5b58\u539f\u59cb\u91cd\u5b9a\u5411\u76f8\u5f53\u957f\u7684\u4e00\u6bb5\u65f6\u95f4\u3002<\/p>\n<p>\u6240\u4ee5\uff0c\u5f53\u4f60\u8981\u521b\u5efa\u91cd\u5b9a\u5411\u7684\u65f6\u5019\uff0c\u8981\u4ece\u957f\u8fdc\u7684\u89d2\u5ea6\u8003\u8651\uff0c\u672a\u6765\u662f\u5426\u4f1a\u4fee\u6539\u8fd9\u4e2a\u91cd\u5b9a\u5411\u3002\u5982\u679c\u4e0d\u4f1a\u4fee\u6539\uff0c\u90a3\u4e48\u76f4\u63a5\u4f7f\u7528 301 \u5c31\u884c\u3002\u5982\u679c\u6709\u53ef\u80fd\u9700\u8981\u4fee\u6539\u7684\u8bdd\uff0c\u90a3\u4e48\u4f7f\u7528 301 \u91cd\u5b9a\u5411\u65f6\uff0c\u8bf7\u7981\u6b62\u5bf9\u5176\u8fdb\u884c\u7f13\u5b58\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u4e24\u79cd\u7981\u7528\u7f13\u5b58\u7684\u65b9\u6cd5\uff1a<\/p>\n<p>\u5728\u670d\u52a1\u7aef\u54cd\u5e94\u5934\u4e2d\u6dfb\u52a0 \u201cCache-Control\uff1ano-cache\u201d(\u63a8\u8350\u8fd9\u79cd\u65b9\u6cd5)<\/p>\n<p>\u5728\u91cd\u5b9a\u5411\u9875\u9762\u7684 Header \u4e2d\u4f7f\u7528 \u201c Pragma\uff1ano-cache\u201d<\/p>\n<p>301\u548c302\u7684\u533a\u522b<\/p>\n<p>\u76f8\u4fe1\u770b\u5230\u8fd9\u91cc\uff0c\u4f60\u5df2\u7ecf\u77e5\u9053 301 \u548c 302 \u7684\u533a\u522b\u4e86!<\/p>\n<p>\u5176\u5b9e\u6211\u4eec\u6240\u8bf4\u7684 301 \u548c 302 \u7684\u533a\u522b\uff0c\u5176\u5b9e\u66f4\u591a\u7684\u662f 301 \u548c 307 \u7684\u533a\u522b\uff0c\u4e5f\u5c31\u662f\u6c38\u4e45\u548c\u4e34\u65f6\u91cd\u5b9a\u5411\u7684\u533a\u522b\u3002<\/p>\n<p>301 \u662f\u6c38\u4e45\u7684\u91cd\u5b9a\u5411\uff0c\u641c\u7d22\u5f15\u64ce\u4f1a\u7f13\u5b58\u8fd9\u4e2a\u91cd\u5b9a\u5411\uff0c\u4e5f\u662f 301 \u4f20\u9012\u6743\u91cd\u7684\u4e00\u4e2a\u539f\u56e0\u3002<\/p>\n<p>307 \u5c31\u662f\u4e34\u65f6\u91cd\u5b9a\u5411\uff0c\u610f\u5473\u7740\u5f53\u524d\u8fd9\u4e2a\u94fe\u63a5\u968f\u65f6\u6709\u53ef\u80fd\u53d6\u6d88\u91cd\u5b9a\u5411\u6216\u8005\u91cd\u5b9a\u5411\u5230\u5176\u4ed6\u5730\u65b9\u53bb\uff0c\u641c\u7d22\u5f15\u64ce\u5e76\u4e0d\u4f1a\u7f13\u5b58\u8fd9\u4e2a\u91cd\u5b9a\u5411\u3002<\/p>\n<p>\u800c\u4eba\u4eec\u5e38\u8bf4\u7684 302 \u5176\u5b9e\u5c31\u662f 303 \u6216\u8005 307\u3002\u63a8\u8350\u76f8\u5173\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/knowledge\/1640.html\">\u300a\u4ec0\u4e48\u662f\u91cd\u5b9a\u5411\u4ee5\u53ca\u5404\u7c7b\u91cd\u5b9a\u5411\u7684\u533a\u522b\u300b<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u5f00\u59cb\u63a5\u89e6\u7f51\u7ad9 SEO \u7684\u65f6\u5019\uff0c\u7ecf\u5e38\u4f1a\u542c\u5230\u6709\u4eba\u8bf4 301 \u91cd\u5b9a\u5411\u597d\uff0c\u53ef\u4ee5\u4f20\u9012\u6743\u91cd\uff0c302 \u6ca1\u7528\u3002\u4e4b\u524d\u2026 <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[796,799,800,794],"class_list":["post-2007","post","type-post","status-publish","format-standard","hentry","category-cjwt","tag-796","tag-799","tag-800","tag-http"],"_links":{"self":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/2007","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/comments?post=2007"}],"version-history":[{"count":0,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/2007\/revisions"}],"wp:attachment":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/media?parent=2007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/categories?post=2007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/tags?post=2007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}