{"id":54869,"date":"2024-10-09T22:27:22","date_gmt":"2024-10-09T14:27:22","guid":{"rendered":"https:\/\/server.hk\/cnblog\/54869\/"},"modified":"2024-10-09T22:27:22","modified_gmt":"2024-10-09T14:27:22","slug":"%e8%a9%b3%e8%a7%a3-iis-%e4%b8%ad-url-%e9%87%8d%e5%af%ab%e5%b7%a5%e5%85%b7%e7%9a%84%e5%8c%b9%e9%85%8d-url-%e8%a6%8f%e5%89%87%e6%a8%a1%e5%bc%8f%ef%bc%88rule-patterns%ef%bc%89","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/54869\/","title":{"rendered":"\u8a73\u89e3 IIS \u4e2d URL \u91cd\u5beb\u5de5\u5177\u7684\u5339\u914d URL &#8211; \u898f\u5247\u6a21\u5f0f\uff08Rule Patterns\uff09"},"content":{"rendered":"<h1 id=\"%e8%a9%b3%e8%a7%a3-iis-%e4%b8%ad-url-%e9%87%8d%e5%af%ab%e5%b7%a5%e5%85%b7%e7%9a%84%e5%8c%b9%e9%85%8d-url-%e8%a6%8f%e5%89%87%e6%a8%a1%e5%bc%8f%ef%bc%88rule-patterns%ef%bc%89-ARByPlrZoe\">\u8a73\u89e3 IIS \u4e2d URL \u91cd\u5beb\u5de5\u5177\u7684\u5339\u914d URL &#8211; \u898f\u5247\u6a21\u5f0f\uff08Rule Patterns\uff09<\/h1>\n<p>\u5728\u73fe\u4eca\u7684\u7db2\u7d61\u74b0\u5883\u4e2d\uff0cURL \u91cd\u5beb\u6280\u8853\u5df2\u6210\u70ba\u7db2\u7ad9\u7ba1\u7406\u7684\u91cd\u8981\u5de5\u5177\u3002\u5c0d\u65bc\u4f7f\u7528 Internet Information Services (IIS) \u7684\u7db2\u7ad9\u7ba1\u7406\u54e1\u4f86\u8aaa\uff0cURL \u91cd\u5beb\u4e0d\u50c5\u80fd\u6539\u5584\u7db2\u7ad9\u7684\u53ef\u8b80\u6027\uff0c\u9084\u80fd\u63d0\u5347 SEO \u6548\u679c\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e IIS \u4e2d URL \u91cd\u5beb\u5de5\u5177\u7684\u5339\u914d URL \u898f\u5247\u6a21\u5f0f\uff08Rule Patterns\uff09\uff0c\u5e6b\u52a9\u8b80\u8005\u66f4\u597d\u5730\u7406\u89e3\u5176\u904b\u4f5c\u539f\u7406\u53ca\u61c9\u7528\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%af-url-%e9%87%8d%e5%af%ab%ef%bc%9f-ARByPlrZoe\">\u4ec0\u9ebc\u662f URL \u91cd\u5beb\uff1f<\/h2>\n<p>URL \u91cd\u5beb\u662f\u4e00\u7a2e\u6280\u8853\uff0c\u901a\u904e\u5c07\u7528\u6236\u8acb\u6c42\u7684 URL \u8f49\u63db\u70ba\u66f4\u6613\u65bc\u7406\u89e3\u548c\u8a18\u61b6\u7684\u683c\u5f0f\uff0c\u4f86\u6539\u5584\u7db2\u7ad9\u7684\u53ef\u7528\u6027\u548c\u641c\u7d22\u5f15\u64ce\u512a\u5316\u3002\u9019\u4e00\u904e\u7a0b\u901a\u5e38\u6d89\u53ca\u5c07\u52d5\u614b\u751f\u6210\u7684 URL \u8f49\u63db\u70ba\u975c\u614b URL\uff0c\u5f9e\u800c\u4f7f\u5176\u66f4\u5177\u5438\u5f15\u529b\u3002<\/p>\n<h2 id=\"iis-%e4%b8%ad%e7%9a%84-url-%e9%87%8d%e5%af%ab%e6%a8%a1%e7%b5%84-ARByPlrZoe\">IIS \u4e2d\u7684 URL \u91cd\u5beb\u6a21\u7d44<\/h2>\n<p>IIS \u63d0\u4f9b\u4e86\u4e00\u500b\u5f37\u5927\u7684 URL \u91cd\u5beb\u6a21\u7d44\uff0c\u5141\u8a31\u7528\u6236\u5275\u5efa\u548c\u7ba1\u7406\u91cd\u5beb\u898f\u5247\u3002\u9019\u4e9b\u898f\u5247\u53ef\u4ee5\u6839\u64da\u7279\u5b9a\u7684\u6a21\u5f0f\u5339\u914d URL\uff0c\u4e26\u6839\u64da\u9700\u8981\u9032\u884c\u91cd\u5beb\u6216\u91cd\u5b9a\u5411\u3002\u9019\u4e9b\u898f\u5247\u7684\u8a2d\u7f6e\u901a\u5e38\u5728\u7db2\u7ad9\u7684 web.config \u6587\u4ef6\u4e2d\u9032\u884c\u3002<\/p>\n<h2 id=\"%e8%a6%8f%e5%89%87%e6%a8%a1%e5%bc%8f%ef%bc%88rule-patterns%ef%bc%89-ARByPlrZoe\">\u898f\u5247\u6a21\u5f0f\uff08Rule Patterns\uff09<\/h2>\n<p>\u5728 IIS \u7684 URL \u91cd\u5beb\u5de5\u5177\u4e2d\uff0c\u898f\u5247\u6a21\u5f0f\u662f\u7528\u4f86\u5b9a\u7fa9\u5982\u4f55\u5339\u914d\u8acb\u6c42 URL \u7684\u4e00\u7d44\u689d\u4ef6\u3002\u9019\u4e9b\u6a21\u5f0f\u53ef\u4ee5\u4f7f\u7528\u6b63\u5247\u8868\u9054\u5f0f\u4f86\u63cf\u8ff0\uff0c\u5f9e\u800c\u63d0\u4f9b\u9748\u6d3b\u7684\u5339\u914d\u80fd\u529b\u3002<\/p>\n<h3 id=\"%e5%9f%ba%e6%9c%ac%e8%aa%9e%e6%b3%95-ARByPlrZoe\">\u57fa\u672c\u8a9e\u6cd5<\/h3>\n<p>\u898f\u5247\u6a21\u5f0f\u7684\u57fa\u672c\u8a9e\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre><code>\n\n    \n        \n            \n            \n        \n    \n\n<\/code><\/pre>\n<p>\u5728\u9019\u500b\u4f8b\u5b50\u4e2d\uff0c\u7576\u7528\u6236\u8acb\u6c42 &#8220;old-page.html&#8221; \u6642\uff0c\u7cfb\u7d71\u6703\u5c07\u5176\u91cd\u5b9a\u5411\u5230 &#8220;new-page.html&#8221;\u3002<\/p>\n<h3 id=\"%e4%bd%bf%e7%94%a8%e6%ad%a3%e5%89%87%e8%a1%a8%e9%81%94%e5%bc%8f-ARByPlrZoe\">\u4f7f\u7528\u6b63\u5247\u8868\u9054\u5f0f<\/h3>\n<p>\u898f\u5247\u6a21\u5f0f\u652f\u6301\u6b63\u5247\u8868\u9054\u5f0f\uff0c\u9019\u4f7f\u5f97\u5339\u914d\u8b8a\u5f97\u66f4\u52a0\u9748\u6d3b\u3002\u4f8b\u5982\uff0c\u4ee5\u4e0b\u898f\u5247\u5c07\u5339\u914d\u6240\u6709\u4ee5 &#8220;.php&#8221; \u7d50\u5c3e\u7684 URL\uff1a<\/p>\n<pre><code>\n\n    \n    \n\n<\/code><\/pre>\n<p>\u5728\u9019\u500b\u4f8b\u5b50\u4e2d\uff0c\u4efb\u4f55\u8acb\u6c42 &#8220;.php&#8221; \u7684 URL \u90fd\u6703\u88ab\u91cd\u5b9a\u5411\u5230\u76f8\u61c9\u7684 &#8220;.html&#8221; \u6587\u4ef6\u3002<\/p>\n<h2 id=\"%e5%b8%b8%e8%a6%8b%e7%9a%84%e5%8c%b9%e9%85%8d%e6%a8%a1%e5%bc%8f-ARByPlrZoe\">\u5e38\u898b\u7684\u5339\u914d\u6a21\u5f0f<\/h2>\n<ul>\n<li><strong>\u7cbe\u78ba\u5339\u914d\uff1a<\/strong>\u4f7f\u7528\u5b8c\u6574\u7684 URL \u9032\u884c\u5339\u914d\u3002<\/li>\n<li><strong>\u901a\u914d\u7b26\u5339\u914d\uff1a<\/strong>\u4f7f\u7528 &#8220;*&#8221; \u4f86\u5339\u914d\u4efb\u610f\u5b57\u7b26\u3002<\/li>\n<li><strong>\u6b63\u5247\u8868\u9054\u5f0f\u5339\u914d\uff1a<\/strong>\u4f7f\u7528\u6b63\u5247\u8868\u9054\u5f0f\u9032\u884c\u66f4\u8907\u96dc\u7684\u5339\u914d\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%9c%80%e4%bd%b3%e5%af%a6%e8%b8%90-ARByPlrZoe\">\u6700\u4f73\u5be6\u8e10<\/h2>\n<p>\u5728\u8a2d\u7f6e URL \u91cd\u5beb\u898f\u5247\u6642\uff0c\u9075\u5faa\u4e00\u4e9b\u6700\u4f73\u5be6\u8e10\u53ef\u4ee5\u63d0\u9ad8\u6548\u7387\u548c\u53ef\u7dad\u8b77\u6027\uff1a<\/p>\n<ul>\n<li>\u4fdd\u6301\u898f\u5247\u7c21\u6f54\u660e\u4e86\uff0c\u907f\u514d\u904e\u65bc\u8907\u96dc\u7684\u6b63\u5247\u8868\u9054\u5f0f\u3002<\/li>\n<li>\u5b9a\u671f\u6aa2\u67e5\u548c\u66f4\u65b0\u91cd\u5beb\u898f\u5247\uff0c\u4ee5\u78ba\u4fdd\u5176\u6709\u6548\u6027\u3002<\/li>\n<li>\u4f7f\u7528\u8a3b\u91cb\u4f86\u89e3\u91cb\u6bcf\u500b\u898f\u5247\u7684\u76ee\u7684\uff0c\u65b9\u4fbf\u672a\u4f86\u7684\u7dad\u8b77\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-ARByPlrZoe\">\u7e3d\u7d50<\/h2>\n<p>IIS \u4e2d\u7684 URL \u91cd\u5beb\u5de5\u5177\u63d0\u4f9b\u4e86\u5f37\u5927\u7684\u529f\u80fd\u4f86\u6539\u5584\u7db2\u7ad9\u7684\u53ef\u7528\u6027\u548c SEO \u6548\u679c\u3002\u901a\u904e\u9748\u6d3b\u7684\u898f\u5247\u6a21\u5f0f\uff0c\u7db2\u7ad9\u7ba1\u7406\u54e1\u53ef\u4ee5\u6839\u64da\u9700\u6c42\u8a2d\u7f6e\u5404\u7a2e\u5339\u914d\u898f\u5247\uff0c\u5f9e\u800c\u5be6\u73fe\u9ad8\u6548\u7684 URL \u91cd\u5beb\u3002\u5c0d\u65bc\u5e0c\u671b\u63d0\u5347\u7db2\u7ad9\u6027\u80fd\u7684\u7528\u6236\uff0c\u9078\u64c7\u5408\u9069\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u89e3\u6c7a\u65b9\u6848\u5c07\u662f\u660e\u667a\u4e4b\u8209\uff0c\u56e0\u70ba\u9019\u6a23\u53ef\u4ee5\u78ba\u4fdd\u7db2\u7ad9\u5728\u7a69\u5b9a\u6027\u548c\u901f\u5ea6\u4e0a\u7684\u512a\u52e2\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3 IIS \u4e2d URL \u91cd\u5beb\u5de5\u5177\u7684\u898f\u5247\u6a21\u5f0f\uff0c\u638c\u63e1\u5982\u4f55\u6709\u6548\u5339\u914d\u548c\u7ba1\u7406 URL\uff0c\u63d0\u5347\u7db2\u7ad9\u6027\u80fd\u8207 SEO\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-54869","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/54869","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=54869"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/54869\/revisions"}],"predecessor-version":[{"id":54870,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/54869\/revisions\/54870"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=54869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=54869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=54869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}