{"id":53643,"date":"2024-10-09T13:02:14","date_gmt":"2024-10-09T05:02:14","guid":{"rendered":"https:\/\/server.hk\/cnblog\/53643\/"},"modified":"2024-10-09T13:02:14","modified_gmt":"2024-10-09T05:02:14","slug":"url-%e9%87%8d%e5%af%ab-iirf","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/53643\/","title":{"rendered":"URL \u91cd\u5beb IIRF"},"content":{"rendered":"<h1 id=\"url-%e9%87%8d%e5%af%ab-iirf-%e7%9a%84%e6%b7%b1%e5%85%a5%e6%8e%a2%e8%a8%8e-JgEhLOcySu\">URL \u91cd\u5beb IIRF \u7684\u6df1\u5165\u63a2\u8a0e<\/h1>\n<p>\u5728\u73fe\u4eca\u7684\u7db2\u7d61\u74b0\u5883\u4e2d\uff0cURL \u91cd\u5beb\u6280\u8853\u5df2\u6210\u70ba\u7db2\u7ad9\u512a\u5316\u548c\u7528\u6236\u9ad4\u9a57\u7684\u91cd\u8981\u5de5\u5177\u3002IIRF\uff08ISAPI Rewrite Filter\uff09\u662f\u4e00\u7a2e\u6d41\u884c\u7684 URL \u91cd\u5beb\u89e3\u6c7a\u65b9\u6848\uff0c\u7279\u5225\u9069\u7528\u65bc Windows \u74b0\u5883\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e IIRF \u7684\u529f\u80fd\u3001\u512a\u52e2\u53ca\u5176\u5728\u7db2\u7ad9\u7ba1\u7406\u4e2d\u7684\u61c9\u7528\u3002<\/p>\n<h2 id=\"iirf-%e7%9a%84%e5%9f%ba%e6%9c%ac%e6%a6%82%e5%bf%b5-JgEhLOcySu\">IIRF \u7684\u57fa\u672c\u6982\u5ff5<\/h2>\n<p>IIRF \u662f\u4e00\u500b\u8f15\u91cf\u7d1a\u7684 ISAPI \u64f4\u5c55\uff0c\u5141\u8a31\u7528\u6236\u5728 IIS\uff08Internet Information Services\uff09\u4e0a\u9032\u884c URL \u91cd\u5beb\u3002\u9019\u610f\u5473\u8457\u7528\u6236\u53ef\u4ee5\u5c07\u8907\u96dc\u7684 URL \u8f49\u63db\u70ba\u66f4\u7c21\u55ae\u3001\u66f4\u6613\u65bc\u7406\u89e3\u7684\u683c\u5f0f\uff0c\u5f9e\u800c\u63d0\u9ad8\u7db2\u7ad9\u7684\u53ef\u8b80\u6027\u548c SEO\uff08\u641c\u7d22\u5f15\u64ce\u512a\u5316\uff09\u6548\u679c\u3002<\/p>\n<h2 id=\"iirf-%e7%9a%84%e4%b8%bb%e8%a6%81%e5%8a%9f%e8%83%bd-JgEhLOcySu\">IIRF \u7684\u4e3b\u8981\u529f\u80fd<\/h2>\n<ul>\n<li><strong>\u7c21\u5316 URL \u7d50\u69cb\uff1a<\/strong>\u901a\u904e\u91cd\u5beb URL\uff0c\u7db2\u7ad9\u7ba1\u7406\u54e1\u53ef\u4ee5\u5c07\u52d5\u614b\u751f\u6210\u7684 URL \u8f49\u63db\u70ba\u975c\u614b URL\uff0c\u9019\u6a23\u4e0d\u50c5\u4f7f URL \u66f4\u52a0\u7f8e\u89c0\uff0c\u9084\u80fd\u63d0\u9ad8\u7528\u6236\u7684\u9ede\u64ca\u7387\u3002<\/li>\n<li><strong>\u589e\u5f37 SEO \u6548\u679c\uff1a<\/strong>\u641c\u7d22\u5f15\u64ce\u66f4\u559c\u6b61\u7c21\u6f54\u660e\u77ad\u7684 URL\uff0c\u4f7f\u7528 IIRF \u53ef\u4ee5\u5e6b\u52a9\u7db2\u7ad9\u5728\u641c\u7d22\u7d50\u679c\u4e2d\u7372\u5f97\u66f4\u597d\u7684\u6392\u540d\u3002<\/li>\n<li><strong>\u63d0\u9ad8\u5b89\u5168\u6027\uff1a<\/strong>\u901a\u904e\u96b1\u85cf\u5be6\u969b\u7684 URL \u7d50\u69cb\uff0cIIRF \u53ef\u4ee5\u6e1b\u5c11\u6f5b\u5728\u7684\u5b89\u5168\u98a8\u96aa\uff0c\u9632\u6b62\u653b\u64ca\u8005\u5229\u7528\u5df2\u77e5\u7684 URL \u7d50\u69cb\u9032\u884c\u653b\u64ca\u3002<\/li>\n<\/ul>\n<h2 id=\"iirf-%e7%9a%84%e5%ae%89%e8%a3%9d%e8%88%87%e9%85%8d%e7%bd%ae-JgEhLOcySu\">IIRF \u7684\u5b89\u88dd\u8207\u914d\u7f6e<\/h2>\n<p>\u5b89\u88dd IIRF \u76f8\u5c0d\u7c21\u55ae\uff0c\u4ee5\u4e0b\u662f\u57fa\u672c\u7684\u6b65\u9a5f\uff1a<\/p>\n<pre><code>1. \u4e0b\u8f09 IIRF \u7684\u5b89\u88dd\u5305\u3002\n2. \u5c07 IIRF.dll \u6587\u4ef6\u653e\u7f6e\u65bc IIS \u7684\u6839\u76ee\u9304\u4e0b\u3002\n3. \u5728 IIS \u7ba1\u7406\u5668\u4e2d\uff0c\u70ba\u7db2\u7ad9\u6dfb\u52a0 ISAPI \u64f4\u5c55\u3002\n4. \u914d\u7f6e IIRF.ini \u6587\u4ef6\u4ee5\u8a2d\u7f6e\u91cd\u5beb\u898f\u5247\u3002<\/code><\/pre>\n<h3 id=\"%e9%85%8d%e7%bd%ae-iirf-ini-%e6%96%87%e4%bb%b6-JgEhLOcySu\">\u914d\u7f6e IIRF.ini \u6587\u4ef6<\/h3>\n<p>IIRF \u7684\u914d\u7f6e\u4e3b\u8981\u901a\u904e IIRF.ini \u6587\u4ef6\u9032\u884c\u3002\u4ee5\u4e0b\u662f\u4e00\u500b\u7c21\u55ae\u7684\u914d\u7f6e\u7bc4\u4f8b\uff1a<\/p>\n<pre><code>[Rewrite]\n# \u5c07 \/product.php?id=123 \u91cd\u5beb\u70ba \/product\/123\nRewriteRule ^\/product\/([0-9]+)$ \/product.php?id=$1 [I]<\/code><\/pre>\n<p>\u5728\u9019\u500b\u4f8b\u5b50\u4e2d\uff0c\u7576\u7528\u6236\u8a2a\u554f <code>\/product\/123<\/code> \u6642\uff0cIIRF \u6703\u5c07\u5176\u91cd\u5beb\u70ba <code>\/product.php?id=123<\/code>\uff0c\u5f9e\u800c\u5be6\u73fe URL \u7684\u7c21\u5316\u3002<\/p>\n<h2 id=\"iirf-%e7%9a%84%e5%84%aa%e5%8b%a2%e8%88%87%e6%8c%91%e6%88%b0-JgEhLOcySu\">IIRF \u7684\u512a\u52e2\u8207\u6311\u6230<\/h2>\n<h3 id=\"%e5%84%aa%e5%8b%a2-JgEhLOcySu\">\u512a\u52e2<\/h3>\n<ul>\n<li>\u8f15\u91cf\u7d1a\uff1aIIRF \u7684\u5b89\u88dd\u548c\u914d\u7f6e\u76f8\u5c0d\u7c21\u55ae\uff0c\u9069\u5408\u5404\u985e\u578b\u7684\u7db2\u7ad9\u3002<\/li>\n<li>\u9748\u6d3b\u6027\uff1a\u652f\u6301\u591a\u7a2e\u91cd\u5beb\u898f\u5247\uff0c\u80fd\u5920\u6eff\u8db3\u4e0d\u540c\u7db2\u7ad9\u7684\u9700\u6c42\u3002<\/li>\n<\/ul>\n<h3 id=\"%e6%8c%91%e6%88%b0-JgEhLOcySu\">\u6311\u6230<\/h3>\n<ul>\n<li>\u517c\u5bb9\u6027\uff1a\u67d0\u4e9b\u820a\u7248\u7684 IIS \u53ef\u80fd\u4e0d\u5b8c\u5168\u652f\u6301 IIRF \u7684\u6240\u6709\u529f\u80fd\u3002<\/li>\n<li>\u5b78\u7fd2\u66f2\u7dda\uff1a\u5c0d\u65bc\u521d\u5b78\u8005\u4f86\u8aaa\uff0c\u7406\u89e3\u6b63\u5247\u8868\u9054\u5f0f\u548c\u91cd\u5beb\u898f\u5247\u53ef\u80fd\u9700\u8981\u4e00\u5b9a\u7684\u6642\u9593\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b5%90%e8%ab%96-JgEhLOcySu\">\u7d50\u8ad6<\/h2>\n<p>IIRF \u4f5c\u70ba\u4e00\u7a2e\u5f37\u5927\u7684 URL \u91cd\u5beb\u5de5\u5177\uff0c\u80fd\u5920\u6709\u6548\u63d0\u5347\u7db2\u7ad9\u7684\u53ef\u8b80\u6027\u548c SEO \u6548\u679c\u3002\u96d6\u7136\u5728\u4f7f\u7528\u904e\u7a0b\u4e2d\u53ef\u80fd\u6703\u9047\u5230\u4e00\u4e9b\u6311\u6230\uff0c\u4f46\u5176\u5e36\u4f86\u7684\u597d\u8655\u7121\u7591\u662f\u503c\u5f97\u7684\u3002\u5c0d\u65bc\u5e0c\u671b\u512a\u5316\u7db2\u7ad9\u7684\u7ba1\u7406\u54e1\u4f86\u8aaa\uff0c\u638c\u63e1 IIRF \u7684\u4f7f\u7528\u5c07\u662f\u4e00\u9805\u91cd\u8981\u7684\u6280\u80fd\u3002<\/p>\n<p>\u5982\u9700\u4e86\u89e3\u66f4\u591a\u6709\u95dc <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u53ca\u5176\u4ed6\u4f3a\u670d\u5668\u89e3\u6c7a\u65b9\u6848\u7684\u4fe1\u606f\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3 IIRF \u7684 URL \u91cd\u5beb\u529f\u80fd\uff0c\u63d0\u5347\u7db2\u7ad9 SEO \u8868\u73fe\uff0c\u7c21\u5316\u7db2\u5740\u7d50\u69cb\uff0c\u589e\u5f37\u7528\u6236\u9ad4\u9a57\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-53643","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/53643","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=53643"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/53643\/revisions"}],"predecessor-version":[{"id":53644,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/53643\/revisions\/53644"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=53643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=53643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=53643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}