{"id":30826,"date":"2024-11-25T11:58:54","date_gmt":"2024-11-25T03:58:54","guid":{"rendered":"https:\/\/fwq.ai\/blog\/30826\/"},"modified":"2024-11-25T11:58:54","modified_gmt":"2024-11-25T03:58:54","slug":"phpcms%e5%a6%82%e4%bd%95%e4%bc%aa%e9%9d%99%e6%80%81%e9%a1%b5%e9%9d%a2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/30826\/","title":{"rendered":"phpcms\u5982\u4f55\u4f2a\u9759\u6001\u9875\u9762"},"content":{"rendered":"<p style=\"text-align: center\"><strong><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/020\/5e0ea44408f74958.jpg\" class=\"aligncenter\" title=\"phpcms\u5982\u4f55\u4f2a\u9759\u6001\u9875\u9762\u63d2\u56fe\" alt=\"phpcms\u5982\u4f55\u4f2a\u9759\u6001\u9875\u9762\u63d2\u56fe\" \/><\/strong><\/p>\n<p><strong>\u5982\u4f55\u4f2a\u9759\u6001\u9875\u9762\uff1f<\/strong><\/p>\n<p><strong>Phpcms V9\u5168\u7ad9\u4f2a\u9759\u6001\u8bbe\u7f6e\u65b9\u6cd5<\/strong><\/p>\n<p>Phpcms V9\u53ef\u4ee5\u8bf4\u662fcms\u7a0b\u5e8f\u4e2d\u81ea\u5b9a\u4e49\u529f\u80fd\u6700\u5f3a\u7684\uff0c\u5728\u9759\u6001\u5316\u4ee5\u53ca\u4f2a\u9759\u6001\u65b9\u9762\u90fd\u53ef\u4ee5\u8bbe\u7f6e\uff0c\u5728\u6b64\u5206\u4eabPHPCMS V9\u4f2a\u9759\u6001\u8bbe\u7f6e\u65b9\u6cd5\uff0c\u5e0c\u671b\u5927\u5bb6\u80fd\u7528\u5f97\u4e0a\uff01<\/p>\n<p>\u4e3a\u4ec0\u4e48\u8981\u4f2a\u9759\u6001\uff1f\u5177\u4f53\u5728\u8fd9\u91cc\u5c31\u4e0d\u8bf4\u4e86\uff0c\u4f60\u61c2\u7684\uff01\u4e00\u65b9\u9762\u66f4\u65b0\u4fee\u6539\u540e\u4e0d\u9700\u8981\u751f\u6210\u9759\u6001\u6587\u4ef6\uff0c\u53e6\u4e00\u65b9\u9762\u4e3a\u4e86SEO\uff01<\/p>\n<p>\u8bbf\u95ee\u89c4\u5219\u5982\u4e0b\uff1a<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<pre>list-{$catid}-{$page}.html\ncontent-{$catid}-{$id}-{$page}.html<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u53ef\u4ee5\u5230\u6269\u5c55-&gt;URL\u89c4\u5219\u7ba1\u7406\uff0c\u8bbe\u7f6e\u3002<\/p>\n<p>\u6ce8\u610f\u4ee5\u4e0b\u7684\u65b9\u6cd5\u53ea\u9002\u7528\u4e8eApache\u670d\u52a1\u5668\u7684\uff0c\u5982\u679cIIS\u670d\u52a1\u5668\u8bf7\u4f7f\u7528httpd.ini\u800c\u4e0d\u662f.htaccess\u3002<\/p>\n<p>\u8bbe\u7f6ehttpd.ini\u7684\u65b9\u6cd5\u7565\u8ddf.htaccess\u4e0d\u540c\uff0c\u56e0\u4e3a\u6211\u672c\u5730\u6ca1\u6709IIS\u6240\u4ee5\u5c31\u4e0d\u5199\u8fd9\u4e9b\u89c4\u5219\u4e86\u3002<\/p>\n<p>\u4e00\u3001\u68c0\u67e5\u670d\u52a1\u5668\u662f\u5426\u652f\u6301rewrite<\/p>\n<p>\u4f8b\u5982\u672c\u5730\u5f00\u542frewrite\u65b9\u6cd5\u5982\u4e0b<\/p>\n<p>Apache \u914d\u7f6e\u6587\u4ef6 httpd.conf<\/p>\n<p>1\u3001LoadModule rewrite_module modules\/mod_rewrite.so<\/p>\n<p>\u628a\u8fd9\u53e5\u7684\u201c#\u201d\u6ce8\u91ca\u6389\u3002<\/p>\n<p>2\u3001AllowOverride none \u6539\u4e3a AllowOverride all<\/p>\n<p>\u91cd\u542fapache\u670d\u52a1\u5668\u3002<\/p>\n<p>\u4e8c\u3001\u51c6\u5907.htaccess\u6587\u4ef6\uff08\u5982\u4f55\u5efa\u7acb. htaccess \uff09<\/p>\n<p>\u82e5\u662fwindows\uff0c\u53ef\u4ee5\u4f7f\u7528\u8bb0\u4e8b\u672c\uff0c\u4fdd\u5b58\u9009\u62e9\u53e6\u5b58\u4e3a\uff0c&#8221;.htaccess&#8221; \uff0c\u6ce8\u610f\u547d\u540d\u65f6\u8981\u52a0\u4e0a&#8221;&#8221;\u3002<\/p>\n<p>\u5f97\u5230.htaccess\u6587\u4ef6\uff0c\u7136\u540e\u628a\u4ee5\u4e0b\u4ee3\u7801\u5199\u8fdb\u53bb\u4fdd\u5b58\u3002<\/p>\n<pre>RewriteEngine&nbsp;On\nRewriteRule&nbsp;^(.*)content-([0-9]+)-([0-9]+)-([0-9]+).html$&nbsp;$1\/index.php?m=content&amp;amp;c=index&amp;amp;a=show&amp;amp;catid=$2&amp;amp;id=\n&nbsp;\n$3&amp;amp;page=$4\nRewriteRule&nbsp;^(.*)show-([0-9]+)-([0-9]+)-([0-9]+).html$&nbsp;$1\/index.php?m=content&amp;amp;c=index&amp;amp;a=show&amp;amp;catid=$2&amp;amp;id=\n&nbsp;\n$3&amp;amp;page=$4\nRewriteRule&nbsp;^(.*)list-([0-9]+)-([0-9]+).html$&nbsp;$1\/index.php?m=content&amp;amp;c=index&amp;amp;a=lists&amp;amp;catid=$2&amp;amp;page=$3<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u7684\u662f.htaccess\u89c4\u5219\uff0c\u8bed\u6cd5\u8be6\u89e3\u53ef\u4ee5\u767e\u5ea6\u4e0b\u3002<\/p>\n<p>\u8981\u662f\u60f3\u5728\u672c\u5730\u6d4b\u8bd5\uff0c\u4f8b\u5982 127.0.0.1\/my2400\uff0c\u56e0\u4e3a\u4e0d\u662f\u6839\u76ee\u5f55\u8bbf\u95ee\uff0c\u6240\u4ee5\u628a\u4ee5\u4e0a\u4ee3\u7801\u6539\u5199\u5982\u4e0b(\u591a\u4e86\u4e2a\/my2400)\uff1a<\/p>\n<pre>RewriteEngine&nbsp;On\nRewriteRule&nbsp;^(.*)content-([0-9]+)-([0-9]+)-([0-9]+).html$&nbsp;$1\/my2400\/index.php?m=content&amp;amp;c=index&amp;amp;a=show&amp;amp;catid=\n&nbsp;\n$2&amp;amp;id=$3&amp;amp;page=$4\nRewriteRule&nbsp;^(.*)show-([0-9]+)-([0-9]+)-([0-9]+).html$&nbsp;$1\/my2400\/index.php?m=content&amp;amp;c=index&amp;amp;a=show&amp;amp;catid=$2&amp;amp;id=\n&nbsp;\n$3&amp;amp;page=$4\nRewriteRule&nbsp;^(.*)list-([0-9]+)-([0-9]+).html$&nbsp;$1\/my2400\/index.php?m=content&amp;amp;c=index&amp;amp;a=lists&amp;amp;catid=$2&amp;amp;page=$3<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4e09\u3001PHPCMS V9\u540e\u53f0\u8bbe\u7f6e\u5206\u7c7b\u680f\u76ee\u3002<\/p>\n<p>\u4f4d\u7f6e\uff1a\u5185\u5bb9-&gt;\u7ba1\u7406\u680f\u76ee-&gt;\u6dfb\u52a0\u680f\u76ee<\/p>\n<p>\u6ce8\u610f\u8bbe\u7f6e\u7b2c\u4e8c\u9009\u9879\u5361\uff0c\u201c\u751f\u6210HTML\u8bbe\u7f6e\u201d<\/p>\n<p>\u680f\u76ee\u9875URL\u89c4\u5219\uff1alist-1-2-1.html<\/p>\n<p>\u5185\u5bb9\u9875URL\u89c4\u5219\uff1acontent-1-2-1.html<\/p>\n<p>\u56db\u3001\u6279\u91cf\u66f4\u65b0URL\uff0c\u5b8c\u6210\u4f2a\u9759\u6001\u8bbe\u7f6e\u3002<\/p>\n<p>PHP\u4e2d\u6587\u7f51\uff0c\u5927\u91cf\u7684\u514d\u8d39\uff0c\u6b22\u8fce\u5728\u7ebf\u5b66\u4e60\uff01<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u4f2a\u9759\u6001\u9875\u9762\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4f2a\u9759\u6001\u9875\u9762\uff1f Phpcms V9\u5168\u7ad9\u4f2a\u9759\u6001\u8bbe\u7f6e\u65b9\u6cd5 Phpcms V9\u53ef\u4ee5\u8bf4\u662fcms\u7a0b\u5e8f\u4e2d\u81ea\u5b9a\u4e49\u529f\u80fd\u6700\u5f3a\u7684\uff0c\u5728\u9759\u6001\u5316\u4ee5\u53ca\u4f2a\u9759\u6001\u65b9\u9762\u90fd\u53ef\u4ee5\u8bbe\u7f6e\uff0c\u5728\u6b64\u5206\u4eabPHPCMS V9\u4f2a\u9759\u6001\u8bbe\u7f6e\u65b9\u6cd5\uff0c\u5e0c\u671b\u5927\u5bb6\u80fd\u7528\u5f97\u4e0a\uff01 \u4e3a\u4ec0\u4e48\u8981\u4f2a\u9759\u6001\uff1f\u5177\u4f53\u5728\u8fd9\u91cc\u5c31\u4e0d\u8bf4\u4e86\uff0c\u4f60\u61c2\u7684\uff01\u4e00\u65b9\u9762\u66f4\u65b0\u4fee\u6539\u540e\u4e0d\u9700\u8981\u751f\u6210\u9759\u6001\u6587\u4ef6\uff0c\u53e6\u4e00\u65b9\u9762\u4e3a\u4e86SEO\uff01 \u8bbf\u95ee\u89c4\u5219\u5982\u4e0b\uff1a \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b list-{$catid}-{$page}.html content-{$catid}-{$id}-{$page}.html \u767b\u5f55\u540e\u590d\u5236 \u53ef\u4ee5\u5230\u6269\u5c55-&gt;URL\u89c4\u5219\u7ba1\u7406\uff0c\u8bbe\u7f6e\u3002 \u6ce8\u610f\u4ee5\u4e0b\u7684\u65b9\u6cd5\u53ea\u9002\u7528\u4e8eApache\u670d\u52a1\u5668\u7684\uff0c\u5982\u679cIIS\u670d\u52a1\u5668\u8bf7\u4f7f\u7528httpd.ini\u800c\u4e0d\u662f.htaccess\u3002 \u8bbe\u7f6ehttpd.ini\u7684\u65b9\u6cd5\u7565\u8ddf.htaccess\u4e0d\u540c\uff0c\u56e0\u4e3a\u6211\u672c\u5730\u6ca1\u6709IIS\u6240\u4ee5\u5c31\u4e0d\u5199\u8fd9\u4e9b\u89c4\u5219\u4e86\u3002 \u4e00\u3001\u68c0\u67e5\u670d\u52a1\u5668\u662f\u5426\u652f\u6301rewrite \u4f8b\u5982\u672c\u5730\u5f00\u542frewrite\u65b9\u6cd5\u5982\u4e0b Apache \u914d\u7f6e\u6587\u4ef6 httpd.conf 1\u3001LoadModule rewrite_module modules\/mod_rewrite.so \u628a\u8fd9\u53e5\u7684\u201c#\u201d\u6ce8\u91ca\u6389\u3002 2\u3001AllowOverride none \u6539\u4e3a AllowOverride all \u91cd\u542fapache\u670d\u52a1\u5668\u3002 \u4e8c\u3001\u51c6\u5907.htaccess\u6587\u4ef6\uff08\u5982\u4f55\u5efa\u7acb. htaccess \uff09 \u82e5\u662fwindows\uff0c\u53ef\u4ee5\u4f7f\u7528\u8bb0\u4e8b\u672c\uff0c\u4fdd\u5b58\u9009\u62e9\u53e6\u5b58\u4e3a\uff0c&#8221;.htaccess&#8221; \uff0c\u6ce8\u610f\u547d\u540d\u65f6\u8981\u52a0\u4e0a&#8221;&#8221;\u3002 \u5f97\u5230.htaccess\u6587\u4ef6\uff0c\u7136\u540e\u628a\u4ee5\u4e0b\u4ee3\u7801\u5199\u8fdb\u53bb\u4fdd\u5b58\u3002 RewriteEngine&nbsp;On RewriteRule&nbsp;^(.*)content-([0-9]+)-([0-9]+)-([0-9]+).html$&nbsp;$1\/index.php?m=content&amp;amp;c=index&amp;amp;a=show&amp;amp;catid=$2&amp;amp;id= &nbsp; $3&amp;amp;page=$4 RewriteRule&nbsp;^(.*)show-([0-9]+)-([0-9]+)-([0-9]+).html$&nbsp;$1\/index.php?m=content&amp;amp;c=index&amp;amp;a=show&amp;amp;catid=$2&amp;amp;id= &nbsp; $3&amp;amp;page=$4 RewriteRule&nbsp;^(.*)list-([0-9]+)-([0-9]+).html$&nbsp;$1\/index.php?m=content&amp;amp;c=index&amp;amp;a=lists&amp;amp;catid=$2&amp;amp;page=$3 \u767b\u5f55\u540e\u590d\u5236 \u4ee5\u4e0a\u7684\u662f.htaccess\u89c4\u5219\uff0c\u8bed\u6cd5\u8be6\u89e3\u53ef\u4ee5\u767e\u5ea6\u4e0b\u3002 \u8981\u662f\u60f3\u5728\u672c\u5730\u6d4b\u8bd5\uff0c\u4f8b\u5982 127.0.0.1\/my2400\uff0c\u56e0\u4e3a\u4e0d\u662f\u6839\u76ee\u5f55\u8bbf\u95ee\uff0c\u6240\u4ee5\u628a\u4ee5\u4e0a\u4ee3\u7801\u6539\u5199\u5982\u4e0b(\u591a\u4e86\u4e2a\/my2400)\uff1a RewriteEngine&nbsp;On RewriteRule&nbsp;^(.*)content-([0-9]+)-([0-9]+)-([0-9]+).html$&nbsp;$1\/my2400\/index.php?m=content&amp;amp;c=index&amp;amp;a=show&amp;amp;catid= &nbsp; $2&amp;amp;id=$3&amp;amp;page=$4 RewriteRule&nbsp;^(.*)show-([0-9]+)-([0-9]+)-([0-9]+).html$&nbsp;$1\/my2400\/index.php?m=content&amp;amp;c=index&amp;amp;a=show&amp;amp;catid=$2&amp;amp;id= &nbsp; $3&amp;amp;page=$4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-30826","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=30826"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30826\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=30826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=30826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=30826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}