{"id":29924,"date":"2024-11-25T08:17:05","date_gmt":"2024-11-25T00:17:05","guid":{"rendered":"https:\/\/fwq.ai\/blog\/29924\/"},"modified":"2024-11-25T08:17:05","modified_gmt":"2024-11-25T00:17:05","slug":"%e4%b8%80%e6%96%87%e6%90%9e%e5%ae%9a%e5%b8%9d%e5%9b%bd7-0%e4%bc%aa%e9%9d%99%e6%80%81apache%e7%9a%84rewrite%e8%ae%be%e7%bd%ae%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/29924\/","title":{"rendered":"\u4e00\u6587\u641e\u5b9a\u5e1d\u56fd7.0\u4f2a\u9759\u6001Apache\u7684Rewrite\u8bbe\u7f6e\u65b9\u6cd5"},"content":{"rendered":"<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/033\/5de1fcab1f8c8383.jpg\" class=\"aligncenter\" title=\"\u4e00\u6587\u641e\u5b9a\u5e1d\u56fd7.0\u4f2a\u9759\u6001Apache\u7684Rewrite\u8bbe\u7f6e\u65b9\u6cd5\u63d2\u56fe\" alt=\"\u4e00\u6587\u641e\u5b9a\u5e1d\u56fd7.0\u4f2a\u9759\u6001Apache\u7684Rewrite\u8bbe\u7f6e\u65b9\u6cd5\u63d2\u56fe\" \/><\/p>\n<p>7.0\u63d0\u4f9b\u4e86\u4f2a\u9759\u6001\u7684\u8bbe\u7f6e\uff0c\u672c\u6587\u5c31\u5e1d\u56fd7.0\u4e0b\u4f2a\u9759\u6001apache\u7684rewrite\u8bbe\u7f6e\u65b9\u6cd5\u7b80\u8ff0\u5982\u4e0b\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<pre>#&nbsp;\u5c06&nbsp;RewriteEngine&nbsp;\u6a21\u5f0f\u6253\u5f00\nRewriteEngine&nbsp;On\n#\u4fe1\u606f\u5185\u5bb9\u9875\uff1ashowinfo-[!--classid--]-[!--id--]-[!--page--].html\nRewriteCond&nbsp;%{QUERY_STRING}&nbsp;^(.*)$\nRewriteRule&nbsp;^showinfo-(.+?)-(.+?)-(.+?).html$&nbsp;\/e\/action\/ShowInfo.php?classid=$1&amp;amp;id=$2&amp;amp;page=$3&nbsp;&lt;p&gt;#\u4fe1\u606f\u5217\u8868\uff1a\nlistinfo-[!--classid--]-[!--page--].html\nRewriteCond&nbsp;%{QUERY_STRING}&nbsp;^(.*)$\nRewriteRule&nbsp;^listinfo-(.+?)-(.+?).html$&nbsp;\/e\/action\/ListInfo\/index.php?classid=$1&amp;amp;page=$2&lt;\/p&gt;&nbsp;&lt;p&gt;#\u6807\u9898\u5206\u7c7b\u5217\u8868\u9875\uff1a\ninfotype-[!--ttid--]-[!--page--].html\nRewriteCond&nbsp;%{QUERY_STRING}&nbsp;^(.*)$\nRewriteRule&nbsp;^infotype-(.+?)-(.+?).html$&nbsp;\/e\/action\/InfoType\/index.php?ttid=$1&amp;amp;page=$2&lt;\/p&gt;&nbsp;&lt;p&gt;#TAGS\u4fe1\u606f\u5217\u8868\u9875\uff1a\ntags-[!--tagname--]-[!--page--].html\nRewriteCond&nbsp;%{QUERY_STRING}&nbsp;^(.*)$\nRewriteRule&nbsp;^tags-(.+?)-(.+?).html$&nbsp;\/e\/tags\/index.php?tagname=$1&amp;amp;page=$2&lt;\/p&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u9ed8\u8ba4\u7684Rewrite\u89c4\u5219\u8bbe\u7f6e\u65b9\u6cd5\u3002<\/p>\n<p>\u63a8\u8350\u5b66\u4e60\u300a\u300b<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4e00\u6587\u641e\u5b9a\u5e1d\u56fd7.0\u4f2a\u9759\u6001Apache\u7684Rewrite\u8bbe\u7f6e\u65b9\u6cd5\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>7.0\u63d0\u4f9b\u4e86\u4f2a\u9759\u6001\u7684\u8bbe\u7f6e\uff0c\u672c\u6587\u5c31\u5e1d\u56fd7.0\u4e0b\u4f2a\u9759\u6001apache\u7684rewrite\u8bbe\u7f6e\u65b9\u6cd5\u7b80\u8ff0\u5982\u4e0b\uff1a \u4ee3\u7801\u5982\u4e0b: #&nbsp;\u5c06&nbsp;RewriteEngine&nbsp;\u6a21\u5f0f\u6253\u5f00 RewriteEngine&nbsp;On #\u4fe1\u606f\u5185\u5bb9\u9875\uff1ashowinfo-[!&#8211;classid&#8211;]-[!&#8211;id&#8211;]-[!&#8211;page&#8211;].html RewriteCond&nbsp;%{QUERY_STRING}&nbsp;^(.*)$ RewriteRule&nbsp;^showinfo-(.+?)-(.+?)-(.+?).html$&nbsp;\/e\/action\/ShowInfo.php?classid=$1&amp;amp;id=$2&amp;amp;page=$3&nbsp;&lt;p&gt;#\u4fe1\u606f\u5217\u8868\uff1a listinfo-[!&#8211;classid&#8211;]-[!&#8211;page&#8211;].html RewriteCond&nbsp;%{QUERY_STRING}&nbsp;^(.*)$ RewriteRule&nbsp;^listinfo-(.+?)-(.+?).html$&nbsp;\/e\/action\/ListInfo\/index.php?classid=$1&amp;amp;page=$2&lt;\/p&gt;&nbsp;&lt;p&gt;#\u6807\u9898\u5206\u7c7b\u5217\u8868\u9875\uff1a infotype-[!&#8211;ttid&#8211;]-[!&#8211;page&#8211;].html RewriteCond&nbsp;%{QUERY_STRING}&nbsp;^(.*)$ RewriteRule&nbsp;^infotype-(.+?)-(.+?).html$&nbsp;\/e\/action\/InfoType\/index.php?ttid=$1&amp;amp;page=$2&lt;\/p&gt;&nbsp;&lt;p&gt;#TAGS\u4fe1\u606f\u5217\u8868\u9875\uff1a tags-[!&#8211;tagname&#8211;]-[!&#8211;page&#8211;].html RewriteCond&nbsp;%{QUERY_STRING}&nbsp;^(.*)$ RewriteRule&nbsp;^tags-(.+?)-(.+?).html$&nbsp;\/e\/tags\/index.php?tagname=$1&amp;amp;page=$2&lt;\/p&gt; \u767b\u5f55\u540e\u590d\u5236 \u4ee5\u4e0a\u5c31\u662f\u9ed8\u8ba4\u7684Rewrite\u89c4\u5219\u8bbe\u7f6e\u65b9\u6cd5\u3002 \u63a8\u8350\u5b66\u4e60\u300a\u300b \u4ee5\u4e0a\u5c31\u662f\u4e00\u6587\u641e\u5b9a\u5e1d\u56fd7.0\u4f2a\u9759\u6001Apache\u7684Rewrite\u8bbe\u7f6e\u65b9\u6cd5\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/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-29924","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29924","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=29924"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29924\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=29924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=29924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=29924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}