{"id":4964,"date":"2023-02-21T17:54:55","date_gmt":"2023-02-21T09:54:55","guid":{"rendered":"https:\/\/km94.com\/?p=4964"},"modified":"2023-02-21T17:54:55","modified_gmt":"2023-02-21T09:54:55","slug":"wordpress%e4%bc%aa%e9%9d%99%e6%80%81%e8%a7%84%e5%88%99%e8%ae%be%e7%bd%ae%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/dy208.cn\/index.php\/2023\/02\/21\/wordpress%e4%bc%aa%e9%9d%99%e6%80%81%e8%a7%84%e5%88%99%e8%ae%be%e7%bd%ae%e6%95%99%e7%a8%8b\/","title":{"rendered":"WordPress\u4f2a\u9759\u6001\u89c4\u5219\u8bbe\u7f6e\u6559\u7a0b"},"content":{"rendered":"<p>\u60f3\u5fc5\u90fd\u4e86\u89e3WordPress\u548c\u5176\u4ed6\u7f51\u7ad9\u7cfb\u7edf\u4e0d\u4e00\u6837\uff0c\u5176\u5b83\u7f51\u7ad9\u7cfb\u7edf\u57fa\u672c\u90fd\u5e26\u6709\u751f\u6210\u9759\u6001\u9875\u9762\u529f\u80fd\u3002\u4f46WordPress\u53ea\u80fd\u4f7f\u7528\u4f2a\u9759\u6001\u3002\u5728\u8fd9\u5c31\u4e0d\u505a\u8fc7\u591a\u4ecb\u7ecd\u4e86\uff0c\u4e0b\u9762\u5c31\u6765\u8bf4\u8bf4WordPress\u4f2a\u9759\u6001\u89c4\u5219\u8bbe\u7f6e\u6559\u7a0b\u3002<\/p>\n<p>\u4f2a\u9759\u6001\uff1a\u5373\u7f51\u7ad9\u672c\u8eab\u662f\u52a8\u6001\u7f51\u9875\u5982.php\u3001.asp\u3001.aspx\u7b49\u683c\u5f0f\uff0c\u800c\u8fd9\u7c7b\u7f51\u9875\u8fd8\u5e26\u201c?\u201d\u52a0\u53c2\u6570\u6765\u8bfb\u53d6\u6570\u636e\u5e93\u3002\u5f00\u542f\u4f2a\u9759\u6001\u540e\uff0c\u52a8\u6001\u7f51\u9875\u5373\u88ab\u8f6c\u6362\u91cd\u5199\u6210\u9759\u6001\u7f51\u9875\u7c7b\u578b\u9875\u9762\u3002<\/p>\n<p>\u5982\u4f55\u5224\u8bfb\u7a7a\u95f4\u662f\u5426\u652f\u6301\u4f2a\u9759\u6001\u3002\u5728\u7f51\u7ad9\u540e\u53f0\uff1a\u8bbe\u7f6e-\u56fa\u5b9a\u94fe\u63a5\uff0c\u9009\u62e9\u7b2c\u4e00\u4e2a\u9664\u5916\uff0c\u770b\u7f51\u7ad9\u5176\u5b83\u9875\u9762\u662f\u5426\u51fa\u73b0404\uff0c\u5982\u679c\u662f\uff0c\u5219\u7a7a\u95f4\u4e0d\u652f\u6301\u4f2a\u9759\u6001\u3002<\/p>\n<p>\n\t<figure class=\"wp-block-image size-full\"><img decoding=\"async\" class=\"wp-image-4966\" alt=\"WordPress\u4f2a\u9759\u6001\u89c4\u5219\" src=\"https:\/\/km94.com\/wp-content\/uploads\/2023\/02\/rg-1.png\"><\/figure>\n\t<\/p>\n<p>\u53ea\u8981\u7a7a\u95f4\u652f\u6301\u4f2a\u9759\u6001\u91cd\u5199URL Rewrite\u529f\u80fd\uff0c\u6839\u636e\u670d\u52a1\u5668\u4e3b\u673a\u7a7a\u95f4\u73af\u5883\uff0c\u53ea\u9700\u52a0\u5165\u4e0b\u5217\u4f2a\u9759\u6001\u89c4\u5219\u5373\u53ef\u3002<\/p>\n<p><strong>\u4e00\u3001Apache\u4f2a\u9759\u6001\u89c4\u5219<\/strong><\/p>\n<p>\u65b0\u5efa\u4e00\u4e2a txt \u6587\u4ef6\uff0c\u5c06\u4e0b\u9762\u7684\u4ee3\u7801\u6dfb\u52a0\u5230\u6587\u4ef6\u4e2d\uff0c\u7136\u540e\u53e6\u5b58\u4e3a.htaccess\u6587\u4ef6\uff0c\u4e0a\u4f20\u5230WordPress\u7ad9\u70b9\u7684\u6839\u76ee\u5f55\u5373\u53ef\u3002<\/p>\n<table border=\"0\" width=\"375\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col width=\"375\"> <\/colgroup>\n<tbody>\n<tr>\n<td class=\"et2\" width=\"375\" height=\"404\">&lt;IfModule mod_rewrite.c&gt;\n<p>RewriteEngine On<\/p>\n<p>RewriteBase \/<\/p>\n<p>RewriteRule ^index\\.php$ &#8211; [L]<\/p>\n<p>RewriteCond %{REQUEST_FILENAME} !-f<\/p>\n<p>RewriteCond %{REQUEST_FILENAME} !-d<\/p>\n<p>RewriteRule . \/index.php [L]<\/p>\n<p>&lt;\/IfModule&gt;<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u4e8c\u3001Nginx\u89c4\u5219<\/strong><\/p>\n<p>\u5728Nginx\u4e2d\u7684server\u6a21\u5757\u914d\u7f6e\u5982\u4e0b\u5185\u5bb9,\u6253\u5f00 nginx.conf \u6216\u8005\u67d0\u4e2a\u7ad9\u70b9\u7684\u914d\u7f6e\u73af\u5883\uff0c\u4f8b\u5982 \/usr\/local\/nginx\/conf\/yzipi.conf\uff0c\u5728server{ } \u5927\u62ec\u53f7\u91cc\u9762\u6dfb\u52a0\u4e0b\u9762\u7684\u4ee3\u7801\u3002<\/p>\n<table border=\"0\" width=\"407\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col width=\"407\"> <\/colgroup>\n<tbody>\n<tr>\n<td class=\"et2\" width=\"407\" height=\"404\">location \/ {\n<p>if (-f $request_filename\/index.html){<\/p>\n<p>rewrite (.*) $1\/index.html break;<\/p>\n<p>}<\/p>\n<p>if (-f $request_filename\/index.php){<\/p>\n<p>rewrite (.*) $1\/index.php;<\/p>\n<p>}<\/p>\n<p>if (!-f $request_filename){<\/p>\n<p>IIS\u4f2a\u9759\u6001\u89c4\u5219rewrite (.*) \/index.php;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u4e09\u3001IIS\u4f2a\u9759\u6001\u89c4\u5219<\/strong><\/p>\n<p>\u65b0\u5efa\u4e00\u4e2atxt\u6587\u4ef6\uff0c\u5c06\u4e0b\u9762\u7684\u4ee3\u7801\u6dfb\u52a0\u5230\u6587\u4ef6\u4e2d\uff0c\u7136\u540e\u53e6\u5b58\u4e3a httpd.ini \u6587\u4ef6\uff0c\u4e0a\u4f20\u5230WordPress\u7ad9\u70b9\u7684\u6839\u76ee\u5f55\u5373\u53ef\u3002<\/p>\n<table border=\"0\" width=\"407\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col width=\"407\"> <\/colgroup>\n<tbody>\n<tr>\n<td class=\"et2\" width=\"407\" height=\"545\">[ISAPI_Rewrite]\n<p># Defend your computer from some worm attacks<\/p>\n<p>#RewriteRule .*(?:global.asa|default\\.ida|root\\.exe|\\.\\.).* . [F,I,O]<\/p>\n<p># 3600 = 1 hour<\/p>\n<p>CacheClockRate 3600<\/p>\n<p>RepeatLimit 32<\/p>\n<p># Protect httpd.ini and httpd.parse.errors files<\/p>\n<p># from accessing through HTTP<\/p>\n<p># Rules to ensure that normal content gets through<\/p>\n<p>RewriteRule \/tag\/(.*) \/index\\.php\\?tag=$1<\/p>\n<p>RewriteRule \/software-files\/(.*) \/software-files\/$1 [L]<\/p>\n<p>RewriteRule \/images\/(.*) \/images\/$1 [L]<\/p>\n<p>RewriteRule \/sitemap.xml \/sitemap.xml [L]<\/p>\n<p>RewriteRule \/favicon.ico \/favicon.ico [L]<\/p>\n<p># For file-based wordpress content (i.e. theme), admin, etc.<\/p>\n<p>RewriteRule \/wp-(.*) \/wp-$1 [L]<\/p>\n<p># For normal wordpress content, via index.php<\/p>\n<p>RewriteRule ^\/$ \/index.php [L]<\/p>\n<p>RewriteRule \/(.*) \/index.php\/$1 [L]<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5173\u4e8eWordPress\u4f2a\u9759\u6001\u89c4\u5219\u8bbe\u7f6e\u6559\u7a0b\u4ecb\u7ecd\uff0c\u5e0c\u671b\u5bf9\u6709\u4e9b\u5c0f\u4f19\u4f34\u6709\u6240\u5e2e\u52a9\uff0c\u66f4\u591a\u6709\u5173\u4e8eWordPress\u6559\u7a0b\u53ef\u4ee5\u53c2\u8003\uff1aWordPress\u4f7f\u7528\u6559\u7a0b <\/p>\n\n<div>\n<div>\n\n\n\n<\/div>\n<div>\n\n\n\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>\u60f3\u5fc5\u90fd\u4e86\u89e3WordPress\u548c\u5176\u4ed6\u7f51\u7ad9\u7cfb\u7edf\u4e0d\u4e00\u6837\uff0c\u5176\u5b83\u7f51\u7ad9\u7cfb\u7edf\u57fa\u672c\u90fd\u5e26\u6709\u751f\u6210\u9759\u6001\u9875\u9762\u529f\u80fd\u3002\u4f46WordPress&hellip;<\/p>\n","protected":false},"author":1,"featured_media":4965,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,2],"tags":[],"class_list":["post-4964","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web","category-jc","entry"],"_links":{"self":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts\/4964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/comments?post=4964"}],"version-history":[{"count":0,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts\/4964\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/media?parent=4964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/categories?post=4964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/tags?post=4964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}