{"id":47030,"date":"2024-10-07T10:54:16","date_gmt":"2024-10-07T02:54:16","guid":{"rendered":"https:\/\/server.hk\/cnblog\/47030\/"},"modified":"2024-10-07T10:54:16","modified_gmt":"2024-10-07T02:54:16","slug":"iis%e7%8b%80%e6%85%8b%e7%a2%bc-508-loop-detected%ef%bc%88%e6%aa%a2%e6%b8%ac%e5%88%b0%e5%be%aa%e7%92%b0%ef%bc%89","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/47030\/","title":{"rendered":"IIS\u72c0\u614b\u78bc &#8211; 508 Loop Detected\uff08\u6aa2\u6e2c\u5230\u5faa\u74b0\uff09"},"content":{"rendered":"<h1 id=\"iis%e7%8b%80%e6%85%8b%e7%a2%bc-508-loop-detected%ef%bc%88%e6%aa%a2%e6%b8%ac%e5%88%b0%e5%be%aa%e7%92%b0%ef%bc%89-ZzHFyPqduB\">IIS\u72c0\u614b\u78bc &#8211; 508 Loop Detected\uff08\u6aa2\u6e2c\u5230\u5faa\u74b0\uff09<\/h1>\n<p>\u5728\u7db2\u7d61\u61c9\u7528\u7a0b\u5e8f\u7684\u958b\u767c\u548c\u7ba1\u7406\u4e2d\uff0cHTTP\u72c0\u614b\u78bc\u662f\u7528\u4f86\u6307\u793a\u8acb\u6c42\u7684\u7d50\u679c\u7684\u91cd\u8981\u5de5\u5177\u3002\u9019\u4e9b\u72c0\u614b\u78bc\u53ef\u4ee5\u5e6b\u52a9\u958b\u767c\u8005\u548c\u7cfb\u7d71\u7ba1\u7406\u54e1\u5feb\u901f\u8b58\u5225\u554f\u984c\u4e26\u9032\u884c\u6545\u969c\u6392\u9664\u3002\u672c\u6587\u5c07\u91cd\u9ede\u4ecb\u7d39IIS\u72c0\u614b\u78bc508 Loop Detected\uff08\u6aa2\u6e2c\u5230\u5faa\u74b0\uff09\uff0c\u5176\u6210\u56e0\u53ca\u89e3\u6c7a\u65b9\u6848\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%afiis%e7%8b%80%e6%85%8b%e7%a2%bc508%ef%bc%9f-ZzHFyPqduB\">\u4ec0\u9ebc\u662fIIS\u72c0\u614b\u78bc508\uff1f<\/h2>\n<p>IIS\u72c0\u614b\u78bc508\u662f\u7531Internet Information Services\uff08IIS\uff09\u4f3a\u670d\u5668\u8fd4\u56de\u7684\u4e00\u7a2e\u932f\u8aa4\u4ee3\u78bc\uff0c\u8868\u793a\u4f3a\u670d\u5668\u6aa2\u6e2c\u5230\u8acb\u6c42\u4e2d\u5b58\u5728\u5faa\u74b0\u5f15\u7528\u3002\u9019\u901a\u5e38\u767c\u751f\u5728Web\u61c9\u7528\u7a0b\u5e8f\u4e2d\uff0c\u7576\u4e00\u500b\u8acb\u6c42\u5728\u8655\u7406\u904e\u7a0b\u4e2d\u4e0d\u65b7\u91cd\u8907\uff0c\u5c0e\u81f4\u4f3a\u670d\u5668\u7121\u6cd5\u5b8c\u6210\u8acb\u6c42\u3002<\/p>\n<h2 id=\"508%e7%8b%80%e6%85%8b%e7%a2%bc%e7%9a%84%e6%88%90%e5%9b%a0-ZzHFyPqduB\">508\u72c0\u614b\u78bc\u7684\u6210\u56e0<\/h2>\n<p>508 Loop Detected\u7684\u4e3b\u8981\u6210\u56e0\u901a\u5e38\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u7121\u9650\u5faa\u74b0\u7684\u91cd\u5b9a\u5411\uff1a<\/strong>\u7576\u4e00\u500bURL\u91cd\u5b9a\u5411\u5230\u53e6\u4e00\u500bURL\uff0c\u800c\u8a72URL\u53c8\u91cd\u5b9a\u5411\u56de\u539f\u59cbURL\u6642\uff0c\u5c31\u6703\u767c\u751f\u7121\u9650\u5faa\u74b0\u3002<\/li>\n<li><strong>\u932f\u8aa4\u7684\u61c9\u7528\u908f\u8f2f\uff1a<\/strong>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u61c9\u7528\u7a0b\u5e8f\u7684\u908f\u8f2f\u53ef\u80fd\u6703\u5c0e\u81f4\u5faa\u74b0\uff0c\u4f8b\u5982\u5728\u8655\u7406\u8acb\u6c42\u6642\u4e0d\u6b63\u78ba\u5730\u8abf\u7528\u81ea\u8eab\u3002<\/li>\n<li><strong>\u914d\u7f6e\u932f\u8aa4\uff1a<\/strong>\u4f3a\u670d\u5668\u7684\u914d\u7f6e\u6587\u4ef6\uff08\u5982web.config\uff09\u4e2d\u53ef\u80fd\u5b58\u5728\u932f\u8aa4\uff0c\u5c0e\u81f4\u8acb\u6c42\u7121\u6cd5\u6b63\u78ba\u8655\u7406\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%a6%82%e4%bd%95%e6%aa%a2%e6%b8%ac%e5%92%8c%e8%a7%a3%e6%b1%ba508%e9%8c%af%e8%aa%a4-ZzHFyPqduB\">\u5982\u4f55\u6aa2\u6e2c\u548c\u89e3\u6c7a508\u932f\u8aa4<\/h2>\n<p>\u7576\u9047\u5230508 Loop Detected\u932f\u8aa4\u6642\uff0c\u53ef\u4ee5\u63a1\u53d6\u4ee5\u4e0b\u6b65\u9a5f\u9032\u884c\u6aa2\u6e2c\u548c\u89e3\u6c7a\uff1a<\/p>\n<h3 id=\"1-%e6%aa%a2%e6%9f%a5%e9%87%8d%e5%ae%9a%e5%90%91%e8%a6%8f%e5%89%87-ZzHFyPqduB\">1. \u6aa2\u67e5\u91cd\u5b9a\u5411\u898f\u5247<\/h3>\n<p>\u9996\u5148\uff0c\u6aa2\u67e5\u61c9\u7528\u7a0b\u5e8f\u4e2d\u7684\u91cd\u5b9a\u5411\u898f\u5247\u3002\u78ba\u4fdd\u6c92\u6709\u7121\u9650\u5faa\u74b0\u7684\u91cd\u5b9a\u5411\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u78bc\u6aa2\u67e5URL\u91cd\u5b9a\u5411\uff1a<\/p>\n<pre><code>if (request.Url.ToString() == \"http:\/\/example.com\/redirect\") {\n    Response.Redirect(\"http:\/\/example.com\/redirect\");\n}<\/code><\/pre>\n<p>\u5728\u9019\u500b\u4f8b\u5b50\u4e2d\uff0c\u8acb\u6c42\u5c07\u4e0d\u65b7\u91cd\u5b9a\u5411\u5230\u81ea\u8eab\uff0c\u5c0e\u81f4508\u932f\u8aa4\u3002<\/p>\n<h3 id=\"2-%e6%aa%a2%e6%9f%a5%e6%87%89%e7%94%a8%e9%82%8f%e8%bc%af-ZzHFyPqduB\">2. \u6aa2\u67e5\u61c9\u7528\u908f\u8f2f<\/h3>\n<p>\u6aa2\u67e5\u61c9\u7528\u7a0b\u5e8f\u7684\u908f\u8f2f\uff0c\u78ba\u4fdd\u6c92\u6709\u4e0d\u5fc5\u8981\u7684\u81ea\u6211\u8abf\u7528\u3002\u9019\u53ef\u4ee5\u901a\u904e\u4ee3\u78bc\u5be9\u67e5\u548c\u55ae\u5143\u6e2c\u8a66\u4f86\u5be6\u73fe\u3002<\/p>\n<h3 id=\"3-%e6%aa%a2%e6%9f%a5%e4%bc%ba%e6%9c%8d%e5%99%a8%e9%85%8d%e7%bd%ae-ZzHFyPqduB\">3. \u6aa2\u67e5\u4f3a\u670d\u5668\u914d\u7f6e<\/h3>\n<p>\u6aa2\u67e5IIS\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u7279\u5225\u662fweb.config\u6587\u4ef6\uff0c\u78ba\u4fdd\u6c92\u6709\u932f\u8aa4\u7684\u914d\u7f6e\u5c0e\u81f4\u5faa\u74b0\u3002\u4f8b\u5982\uff0c\u6aa2\u67e5URL\u91cd\u5beb\u898f\u5247\u662f\u5426\u6b63\u78ba\u3002<\/p>\n<pre><code>&lt;rewrite&gt;\n    &lt;rules&gt;\n        &lt;rule name=\"Redirect to www\" stopProcessing=\"true\"&gt;\n            &lt;match url=\".*\" \/&gt;\n            &lt;conditions&gt;\n                &lt;add input=\"{HTTP_HOST}\" pattern=\"^example.com$\" \/&gt;\n            &lt;\/conditions&gt;\n            &lt;action type=\"Redirect\" url=\"http:\/\/www.example.com\/{R:0}\" redirectType=\"Permanent\" \/&gt;\n        &lt;\/rule&gt;\n    &lt;\/rules&gt;\n&lt;\/rewrite&gt;<\/code><\/pre>\n<h2 id=\"%e7%b8%bd%e7%b5%90-ZzHFyPqduB\">\u7e3d\u7d50<\/h2>\n<p>IIS\u72c0\u614b\u78bc508 Loop Detected\u662f\u4e00\u500b\u91cd\u8981\u7684\u932f\u8aa4\u4ee3\u78bc\uff0c\u6307\u793a\u4f3a\u670d\u5668\u6aa2\u6e2c\u5230\u8acb\u6c42\u4e2d\u7684\u5faa\u74b0\u3002\u901a\u904e\u6aa2\u67e5\u91cd\u5b9a\u5411\u898f\u5247\u3001\u61c9\u7528\u908f\u8f2f\u548c\u4f3a\u670d\u5668\u914d\u7f6e\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u4e86\u89e3\u9019\u4e9b\u932f\u8aa4\u4ee3\u78bc\u4e0d\u50c5\u6709\u52a9\u65bc\u958b\u767c\u8005\u63d0\u9ad8\u61c9\u7528\u7a0b\u5e8f\u7684\u7a69\u5b9a\u6027\uff0c\u9084\u80fd\u63d0\u5347\u7528\u6236\u9ad4\u9a57\u3002<\/p>\n<p>\u5982\u679c\u60a8\u9700\u8981\u66f4\u591a\u6709\u95dc<em><a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a><\/em>\u548c<em><a href=\"https:\/\/server.hk\">\u4f3a\u670d\u5668<\/a><\/em>\u7684\u8cc7\u8a0a\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u4ee5\u7372\u53d6\u66f4\u591a\u8a73\u7d30\u8cc7\u6599\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3IIS\u72c0\u614b\u78bc508\uff08\u5faa\u74b0\u6aa2\u6e2c\uff09\u53ca\u5176\u539f\u56e0\uff0c\u5e6b\u52a9\u60a8\u5feb\u901f\u6392\u9664\u7db2\u7ad9\u5faa\u74b0\u8acb\u6c42\u554f\u984c\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-47030","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/47030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=47030"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/47030\/revisions"}],"predecessor-version":[{"id":47031,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/47030\/revisions\/47031"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=47030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=47030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=47030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}