{"id":31906,"date":"2024-11-25T09:07:30","date_gmt":"2024-11-25T01:07:30","guid":{"rendered":"https:\/\/fwq.ai\/blog\/31906\/"},"modified":"2024-11-25T09:07:30","modified_gmt":"2024-11-25T01:07:30","slug":"%e8%a7%a3%e5%86%b3wordpress%e7%9a%84-htaccess%e8%87%aa%e5%8a%a8%e6%81%a2%e5%a4%8d%e6%88%90%e9%bb%98%e8%ae%a4%e6%a8%a1%e5%bc%8f%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/31906\/","title":{"rendered":"\u89e3\u51b3wordpress\u7684.htaccess\u81ea\u52a8\u6062\u590d\u6210\u9ed8\u8ba4\u6a21\u5f0f\u95ee\u9898"},"content":{"rendered":"<p>\u4e0b\u9762\u7531\/&#8221; target=&#8221;_blank&#8221;&gt;<strong>wordpress\u6559\u7a0b<\/strong>\u680f\u76ee\u7ed9\u5927\u5bb6\u4ecb\u7ecdwordpress\u7684.htaccess\u81ea\u52a8\u6062\u590d\u6210\u9ed8\u8ba4\u6a21\u5f0f\u7684\u89e3\u51b3\u65b9\u6cd5\uff0c\u5e0c\u671b\u5bf9\u9700\u8981\u7684\u670b\u53cb\u6709\u6240\u5e2e\u52a9\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/020\/600e65d728153881.jpg\" class=\"aligncenter\" title=\"\u89e3\u51b3wordpress\u7684.htaccess\u81ea\u52a8\u6062\u590d\u6210\u9ed8\u8ba4\u6a21\u5f0f\u95ee\u9898\u63d2\u56fe\" alt=\"\u89e3\u51b3wordpress\u7684.htaccess\u81ea\u52a8\u6062\u590d\u6210\u9ed8\u8ba4\u6a21\u5f0f\u95ee\u9898\u63d2\u56fe\" \/><\/p>\n<p><span style=\"font-size: 14px\">.htaccess\u914d\u7f6e\u6587\u4ef6\u5c31\u53d1\u6325\u7740\u91cd\u8981\u7684\u4f5c\u7528\u3002\u4f46\u662f\u4e0d\u77e5\u9053\u5927\u5bb6\u6709\u6ca1\u6709\u6ce8\u610f\u5230\uff0cwordpress\u7684.htaccess\u6587\u4ef6\u4f1a\u7ecf\u5e38\u88ab\u66f4\u6539\uff0c\u6211\u8fd9\u91cc\u8bf4\u7684\u88ab\u66f4\u6539\u5e76\u4e0d\u662f\u6307\u7f51\u7ad9\u88ab\u9ed1\uff0c\u6216\u8005\u662f\u5b89\u88c5\u63d2\u4ef6\u5bfc\u81f4.htaccess\u6539\u53d8\uff0c\u800c\u662f\u6307.htaccess\u4e0d\u77e5\u4e0d\u89c9\u7684\u8fd8\u539f\u6210\u9ed8\u8ba4\u7684\u3002<\/span><\/p>\n<p style=\"margin-top:0px;margin-bottom:10px;font-family:Roboto,Helvetica,Arial,sans-serif;line-height:20px\"><span>\u6211\u81ea\u5df1\u6d4b\u8bd5\uff0c\u53ea\u8981\u4f60\u70b9\u51fb\u4e86\u8bbe\u7f6e\u2014\u2014\u56fa\u5b9a\u8fde\u63a5\uff0c\u4e0d\u7ba1\u4f60\u6709\u6ca1\u6709\u4fee\u6539\u4ec0\u4e48\uff0c\u4e5f\u4e0d\u7ba1\u4f60\u53c8\u6ca1\u6709\u4fdd\u5b58\uff0c\u53ea\u8981\u70b9\u51fb\u4e86\u201c\u56fa\u5b9a\u8fde\u63a5\u201d\uff0c.htaccess\u6587\u4ef6\u4e2d# BEGIN WordPress\u548c# END WordPress\u4e4b\u95f4\u7684\u5185\u5bb9\u5c31\u4f1a\u88ab\u66f4\u6539\uff0c\u81ea\u52a8\u8fd8\u539f\u3002\u4e0d\u77e5\u9053\u8fd9\u7b97\u4e0d\u7b97\u662fwordpress\u7684\u4e00\u4e2abug\u3002<\/span><\/p>\n<p style=\"margin-top:0px;margin-bottom:10px;font-family:Roboto,Helvetica,Arial,sans-serif;line-height:20px\"><span>\u8fd9\u4e2a\u95ee\u9898\u6700\u597d\u7684\u89e3\u51b3\u65b9\u6cd5\u662f\uff1a<\/span><\/p>\n<p style=\"margin-top:0px;margin-bottom:10px;font-family:Roboto,Helvetica,Arial,sans-serif;line-height:20px\"><span>\u628a\u81ea\u5df1\u6dfb\u52a0\u5728.htaccess\u4e2d\u7684\u8bed\u53e5\uff0c\u5199\u5728# BEGIN WordPress\u548c# END WordPress\u4e4b\u5916\uff0c\u5982\u4e0b\uff1a<\/span><\/p>\n<blockquote style=\"padding: 10px 20px;margin: 0px 0px 20px;font-size: 17.5px;font-family: Roboto, Helvetica, Arial, sans-serif\">\n<p style=\"margin-top:0px;margin-bottom:10px\"><span># BEGIN WordPress<\/p>\n<p> RewriteEngine On <br \/> RewriteBase \/ <br \/> RewriteRule ^index.php$ \u2013 [L] <br \/> RewriteCond %{REQUEST_FILENAME} !-f <br \/> RewriteCond %{REQUEST_FILENAME} !-d <br \/> RewriteRule . \/index.php [L] <\/p>\n<p> # END WordPress<\/span><\/p>\n<p style=\"margin-top:0px;margin-bottom:0px\"><span><span style=\"color:#ff0000\">RedirectRule 301 ^1.html $ 1.php<\/span><\/span><\/p>\n<\/blockquote>\n<p>\u4ee5\u4e0a\u5c31\u662f\u89e3\u51b3\u7684.htaccess\u81ea\u52a8\u6062\u590d\u6210\u9ed8\u8ba4\u6a21\u5f0f\u95ee\u9898\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>\u4e0b\u9762\u7531\/&#8221; target=&#8221;_blank&#8221;&gt;wordpress\u6559\u7a0b\u680f\u76ee\u7ed9\u5927\u5bb6\u4ecb\u7ecdwordpress\u7684.htaccess\u81ea\u52a8\u6062\u590d\u6210\u9ed8\u8ba4\u6a21\u5f0f\u7684\u89e3\u51b3\u65b9\u6cd5\uff0c\u5e0c\u671b\u5bf9\u9700\u8981\u7684\u670b\u53cb\u6709\u6240\u5e2e\u52a9\uff01 .htaccess\u914d\u7f6e\u6587\u4ef6\u5c31\u53d1\u6325\u7740\u91cd\u8981\u7684\u4f5c\u7528\u3002\u4f46\u662f\u4e0d\u77e5\u9053\u5927\u5bb6\u6709\u6ca1\u6709\u6ce8\u610f\u5230\uff0cwordpress\u7684.htaccess\u6587\u4ef6\u4f1a\u7ecf\u5e38\u88ab\u66f4\u6539\uff0c\u6211\u8fd9\u91cc\u8bf4\u7684\u88ab\u66f4\u6539\u5e76\u4e0d\u662f\u6307\u7f51\u7ad9\u88ab\u9ed1\uff0c\u6216\u8005\u662f\u5b89\u88c5\u63d2\u4ef6\u5bfc\u81f4.htaccess\u6539\u53d8\uff0c\u800c\u662f\u6307.htaccess\u4e0d\u77e5\u4e0d\u89c9\u7684\u8fd8\u539f\u6210\u9ed8\u8ba4\u7684\u3002 \u6211\u81ea\u5df1\u6d4b\u8bd5\uff0c\u53ea\u8981\u4f60\u70b9\u51fb\u4e86\u8bbe\u7f6e\u2014\u2014\u56fa\u5b9a\u8fde\u63a5\uff0c\u4e0d\u7ba1\u4f60\u6709\u6ca1\u6709\u4fee\u6539\u4ec0\u4e48\uff0c\u4e5f\u4e0d\u7ba1\u4f60\u53c8\u6ca1\u6709\u4fdd\u5b58\uff0c\u53ea\u8981\u70b9\u51fb\u4e86\u201c\u56fa\u5b9a\u8fde\u63a5\u201d\uff0c.htaccess\u6587\u4ef6\u4e2d# BEGIN WordPress\u548c# END WordPress\u4e4b\u95f4\u7684\u5185\u5bb9\u5c31\u4f1a\u88ab\u66f4\u6539\uff0c\u81ea\u52a8\u8fd8\u539f\u3002\u4e0d\u77e5\u9053\u8fd9\u7b97\u4e0d\u7b97\u662fwordpress\u7684\u4e00\u4e2abug\u3002 \u8fd9\u4e2a\u95ee\u9898\u6700\u597d\u7684\u89e3\u51b3\u65b9\u6cd5\u662f\uff1a \u628a\u81ea\u5df1\u6dfb\u52a0\u5728.htaccess\u4e2d\u7684\u8bed\u53e5\uff0c\u5199\u5728# BEGIN WordPress\u548c# END WordPress\u4e4b\u5916\uff0c\u5982\u4e0b\uff1a # BEGIN WordPress RewriteEngine On RewriteBase \/ RewriteRule ^index.php$ \u2013 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . \/index.php [L] # END WordPress RedirectRule 301 ^1.html $ 1.php \u4ee5\u4e0a\u5c31\u662f\u89e3\u51b3\u7684.htaccess\u81ea\u52a8\u6062\u590d\u6210\u9ed8\u8ba4\u6a21\u5f0f\u95ee\u9898\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-31906","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31906","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=31906"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31906\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=31906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=31906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=31906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}