{"id":236,"date":"2024-06-22T23:53:10","date_gmt":"2024-06-22T15:53:10","guid":{"rendered":"https:\/\/www1.bonian.qzz.io\/?p=236"},"modified":"2026-10-22T23:55:32","modified_gmt":"2026-10-22T15:55:32","slug":"typecho%e4%bc%aa%e9%9d%99%e6%80%81%e8%ae%be%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/www1.bonian.qzz.io\/?p=236","title":{"rendered":"Typecho\u4f2a\u9759\u6001\u8bbe\u7f6e"},"content":{"rendered":"<p><![ 2024-06-22]\/><br \/>\nTypecho\u4f2a\u9759\u6001\u8bbe\u7f6e<br \/>\n<!https:\/\/web.bonian.qzz.io\/?p=47\/><br \/>\n<!https:\/\/blog.eons.qzz.io\/index.php\/archives\/10\/\/><br \/>\n1) \u201c\u8bbe\u7f6e\u201d,\u70b9\u51fb\u6c38\u4e45\u94fe\u63a5<br \/>\n <img src='http:\/\/edu-image.nosdn.127.net\/9145A693B6C67EC89E84D8C11BAE4613.jpg'\/><\/p>\n<p>2) \u5f00\u542f\u4f2a\u9759\u6001\uff0c\u5e76\u8bbe\u7f6e\u4f2a\u9759\u6001\u8def\u5f84\u89c4\u5219<br \/>\n  <img src='http:\/\/edu-image.nosdn.127.net\/AC7338A6275CBD386BE516EE652CCFFE.jpg'\/><\/p>\n<p>\u6587\u7ae0\u8def\u5f84\u4e2a\u6027\u5316\u5b9a\u4e49\uff1a<br \/>\n\/archives\/{cid}.html<\/p>\n<p>\u72ec\u7acb\u9875\u9762\u8def\u5f84\uff1a<br \/>\n\/{slug}.html<\/p>\n<p>\u5206\u7c7b\u8def\u5f84:<br \/>\n\/category\/{slug}.html<\/p>\n<p>3-1) Linux\u4e0bApache \u73af\u5883\uff08.htaccess\uff09<\/p>\n<p>RewriteEngine On<\/p>\n<p>\u4e0b\u9762\u662f\u5728\u6839\u76ee\u5f55\uff0c\u6587\u4ef6\u5939\u8981\u4fee\u6539\u8def\u5f84<br \/>\nRewriteBase \/<br \/>\nRewriteCond %{REQUEST_FILENAME} !-f<br \/>\nRewriteCond %{REQUEST_FILENAME} !-d<br \/>\nRewriteRule ^(.*)$ \/index.php\/$1 [L]<\/p>\n<p>3-2) Linux\u4e0bNginx \u73af\u5883\uff08nginx.conf\uff09<br \/>\nif (-f $request_filename\/index.html){<\/p>\n<p>rewrite (.*) $1\/index.html break;<br \/>\n}<br \/>\nif (-f $request_filename\/index.php){<\/p>\n<p>rewrite (.*) $1\/index.php;<br \/>\n}<br \/>\nif (!-e $request_filename){<\/p>\n<p>rewrite (.*) \/index.php;<br \/>\n}<\/p>\n<p>3-3) Windows\u4e0bIIS \u73af\u5883\uff08httpd.ini\uff09<br \/>\n[ISAPI_Rewrite]<\/p>\n<p>3600 = 1 hour<br \/>\nCacheClockRate 3600<br \/>\nRepeatLimit 32<\/p>\n<p>\u4e2d\u6587tag\u89e3\u51b3<br \/>\nRewriteRule \/tag\/(.*) \/index.php?tag=$1<\/p>\n<p>sitemapxml<br \/>\nRewriteRule \/sitemap.xml \/sitemap.xml [L]<br \/>\nRewriteRule \/favicon.ico \/favicon.ico [L]<\/p>\n<p>\u5185\u5bb9\u9875<br \/>\nRewriteRule \/(.*).html \/index.php\/$1.html [L]<\/p>\n<p>\u8bc4\u8bba<br \/>\nRewriteRule \/(.*)\/comment \/index.php\/$1\/comment [L]<\/p>\n<p>\u5206\u7c7b\u9875<br \/>\nRewriteRule \/category\/(.*) \/index.php\/category\/$1 [L]<\/p>\n<p>\u5206\u9875<br \/>\nRewriteRule \/page\/(.*) \/index.php\/page\/$1 [L]<\/p>\n<p>\u641c\u7d22\u9875<br \/>\nRewriteRule \/search\/(.*) \/index.php\/search\/$1 [L]<\/p>\n<p>feed<br \/>\nRewriteRule \/feed\/(.*) \/index.php\/feed\/$1 [L]<\/p>\n<p>\u65e5\u671f\u5f52\u6863<br \/>\nRewriteRule \/2(.*) \/index.php\/2$1 [L]<\/p>\n<p>\u4e0a\u4f20\u56fe\u7247\u7b49<br \/>\nRewriteRule \/action(.*) \/index.php\/action$1 [L]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Typecho\u4f2a\u9759\u6001\u8bbe\u7f6e 1) \u201c\u8bbe\u7f6e\u201d,\u70b9\u51fb\u6c38\u4e45\u94fe\u63a5 2) \u5f00\u542f\u4f2a\u9759\u6001\uff0c\u5e76\u8bbe\u7f6e\u4f2a\u9759\u6001\u8def\u5f84\u89c4\u5219 \u6587\u7ae0\u8def\u5f84\u4e2a\u6027\u5316 &#8230; <a title=\"Typecho\u4f2a\u9759\u6001\u8bbe\u7f6e\" class=\"read-more\" href=\"https:\/\/www1.bonian.qzz.io\/?p=236\" aria-label=\"Read more about Typecho\u4f2a\u9759\u6001\u8bbe\u7f6e\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-236","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www1.bonian.qzz.io\/index.php?rest_route=\/wp\/v2\/posts\/236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www1.bonian.qzz.io\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www1.bonian.qzz.io\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www1.bonian.qzz.io\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www1.bonian.qzz.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=236"}],"version-history":[{"count":1,"href":"https:\/\/www1.bonian.qzz.io\/index.php?rest_route=\/wp\/v2\/posts\/236\/revisions"}],"predecessor-version":[{"id":237,"href":"https:\/\/www1.bonian.qzz.io\/index.php?rest_route=\/wp\/v2\/posts\/236\/revisions\/237"}],"wp:attachment":[{"href":"https:\/\/www1.bonian.qzz.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www1.bonian.qzz.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www1.bonian.qzz.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}