{"id":14119,"date":"2024-07-03T22:00:00","date_gmt":"2024-07-03T13:00:00","guid":{"rendered":"https:\/\/hanami-web.tokyo.jp\/blog\/?p=14119"},"modified":"2024-05-31T16:01:16","modified_gmt":"2024-05-31T07:01:16","slug":"htaccess-rules","status":"publish","type":"post","link":"https:\/\/hanami-web.tokyo.jp\/blog\/en\/security-plugin\/all-in-one-wp-security\/htaccess-rules\/","title":{"rendered":"WordPress security enhancement plugin All in one WP Security ~ Explaining firewall .htaccess settings"},"content":{"rendered":"<p>A must-read for those who are concerned about the security of their WordPress site<br>We explain how to enhance security with the free All in one WP Security plugin.<\/p>\n\n\n\n<p>This time, we will explain the Firewall &gt; .htaccess rules settings.<\/p>\n\n\n\n<p>For more information, please see the All in one WP Security explanation table of contents!<\/p>\n\n\n<div class=\"sc\"><a href=\"https:\/\/hanami-web.tokyo.jp\/blog\/en\/wpsecurity\/\" title=\"Strengthening the security of your WordPress site All in one WP Security plugin setup guide Table of contents\">\r\n\t<p class=\"sc-txt01\">Securing your WordPress site<\/p>\r\n\t<p class=\"sc-txt02\">All in one WP Security Setting Explanation Table of Contents \u2192<\/p>\r\n<\/a><\/div>\r\n\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">table of contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #000000;color:#000000\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #000000;color:#000000\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/hanami-web.tokyo.jp\/blog\/en\/security-plugin\/all-in-one-wp-security\/htaccess-rules\/#all_in_one_wp_security_%e3%83%95%e3%82%a1%e3%82%a4%e3%82%a2%e3%82%a6%e3%82%a9%e3%83%bc%e3%83%abphp_rules%e8%a8%ad%e5%ae%9a%e3%81%a8%e3%81%af%ef%bc%9f\" >What is All in one WP Security Firewall PHP rules setting?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/hanami-web.tokyo.jp\/blog\/en\/security-plugin\/all-in-one-wp-security\/htaccess-rules\/#%e5%9f%ba%e6%9c%ac%e7%9a%84%e3%81%aa%e3%83%95%e3%82%a1%e3%82%a4%e3%82%a2%e3%82%a6%e3%82%a9%e3%83%bc%e3%83%ab%e8%a8%ad%e5%ae%9a\" >Basic Firewall Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/hanami-web.tokyo.jp\/blog\/en\/security-plugin\/all-in-one-wp-security\/htaccess-rules\/#%e3%83%87%e3%83%90%e3%83%83%e3%82%b0%e3%83%ad%e3%82%b0%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%b8%e3%81%ae%e3%82%a2%e3%82%af%e3%82%bb%e3%82%b9%e3%82%92%e3%83%96%e3%83%ad%e3%83%83%e3%82%af\" >Block access to debug log files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/hanami-web.tokyo.jp\/blog\/en\/security-plugin\/all-in-one-wp-security\/htaccess-rules\/#%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa%e5%86%85%e5%ae%b9%e3%81%ae%e3%83%aa%e3%82%b9%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0\" >Listing the contents of a directory<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/hanami-web.tokyo.jp\/blog\/en\/security-plugin\/all-in-one-wp-security\/htaccess-rules\/#teace%e3%81%a8track\" >TEACE and TRACK<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/hanami-web.tokyo.jp\/blog\/en\/security-plugin\/all-in-one-wp-security\/htaccess-rules\/#%e3%83%95%e3%82%a1%e3%82%a4%e3%82%a2%e3%82%a6%e3%82%a9%e3%83%bc%e3%83%ab_htaccess_rules_%e8%a8%ad%e5%ae%9a%e4%be%8b\" >Firewall .htaccess rules configuration example<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"all_in_one_wp_security_%e3%83%95%e3%82%a1%e3%82%a4%e3%82%a2%e3%82%a6%e3%82%a9%e3%83%bc%e3%83%abphp_rules%e8%a8%ad%e5%ae%9a%e3%81%a8%e3%81%af%ef%bc%9f\"><\/span>What is All in one WP Security Firewall PHP rules setting?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In the PHP rules settings within the firewall settings of All in one WP Security, you can configure the firewall via .htaccess.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>WP Security<\/li>\n\n\n\n<li>Firewall<\/li>\n\n\n\n<li>.htaccess rules<\/li>\n<\/ul>\n\n\n\n<p>and set it up.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"277\" src=\"https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-80-1024x277.png\" alt=\"\" class=\"wp-image-14121\" srcset=\"https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-80-1024x277.png 1024w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-80-300x81.png 300w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-80-768x208.png 768w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-80-18x5.png 18w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-80.png 1412w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%e5%9f%ba%e6%9c%ac%e7%9a%84%e3%81%aa%e3%83%95%e3%82%a1%e3%82%a4%e3%82%a2%e3%82%a6%e3%82%a9%e3%83%bc%e3%83%ab%e8%a8%ad%e5%ae%9a\"><\/span>Basic Firewall Configuration<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>When the basic firewall setting is turned on, the following functions are enabled. Please change the number of uploaded files as necessary. If the limit is 100MB, you may not be able to upload images.<\/p>\n\n\n\n<p>1) Protect by denying access to .htaceess files<br>2) Disable the server signature<br>3) Limit upload size<br>4) Secure your site by denying access to your wp-config.php file<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"258\" src=\"https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-81-1024x258.png\" alt=\"\" class=\"wp-image-14122\" srcset=\"https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-81-1024x258.png 1024w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-81-300x76.png 300w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-81-768x193.png 768w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-81-18x5.png 18w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-81.png 1457w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%e3%83%87%e3%83%90%e3%83%83%e3%82%b0%e3%83%ad%e3%82%b0%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%b8%e3%81%ae%e3%82%a2%e3%82%af%e3%82%bb%e3%82%b9%e3%82%92%e3%83%96%e3%83%ad%e3%83%83%e3%82%af\"><\/span>Block access to debug log files<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>WordPress outputs log information in wp-content&gt;debug.log. Because it may contain security-related information, it is turned OFF by default, but you should set it to ON.<\/p>\n\n\n\n<p>If you need access to the debug.log file, you can access it through a file manager or via FTP.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"170\" src=\"https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-82-1024x170.png\" alt=\"\" class=\"wp-image-14123\" srcset=\"https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-82-1024x170.png 1024w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-82-300x50.png 300w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-82-768x127.png 768w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-82-18x3.png 18w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-82.png 1471w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa%e5%86%85%e5%ae%b9%e3%81%ae%e3%83%aa%e3%82%b9%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0\"><\/span>Listing the contents of a directory<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>This is a little complicated because you need to change the settings to &quot;AllowOverride&quot; in the Indexes directive in the httpd.conf file, but you do not need to set it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"201\" src=\"https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-84-1024x201.png\" alt=\"\" class=\"wp-image-14125\" srcset=\"https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-84-1024x201.png 1024w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-84-300x59.png 300w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-84-768x150.png 768w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-84-18x4.png 18w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-84.png 1164w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"teace%e3%81%a8track\"><\/span>TEACE and TRACK<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>This function is intended to prevent hacking attacks, so it is set to OFF by default, but you can set it to ON.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"263\" src=\"https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-83-1024x263.png\" alt=\"\" class=\"wp-image-14124\" srcset=\"https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-83-1024x263.png 1024w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-83-300x77.png 300w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-83-768x197.png 768w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-83-18x5.png 18w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-83.png 1074w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%e3%83%95%e3%82%a1%e3%82%a4%e3%82%a2%e3%82%a6%e3%82%a9%e3%83%bc%e3%83%ab_htaccess_rules_%e8%a8%ad%e5%ae%9a%e4%be%8b\"><\/span>Firewall .htaccess rules configuration example<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"716\" src=\"https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-85-1024x716.png\" alt=\"\" class=\"wp-image-14126\" srcset=\"https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-85-1024x716.png 1024w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-85-300x210.png 300w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-85-768x537.png 768w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-85-18x12.png 18w, https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/image-85.png 1046w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>","protected":false},"excerpt":{"rendered":"<p>WordPress\u30b5\u30a4\u30c8\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306b\u4e0d\u5b89\u304c\u3042\u308b\u65b9\u5fc5\u898b\u7121\u6599\u306eAll in one WP Secyruti\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5f37\u5316\u3092\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002 \u4eca\u56de\u306f\u3001\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3000\uff1e\u3000.htaccess rul [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":14127,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":"","_uag_custom_page_level_css":"","footnotes":""},"categories":[1551],"tags":[1549],"class_list":["post-14119","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-all-in-one-wp-security","tag-all-in-one-security"],"blocksy_meta":[],"aioseo_notices":[],"uagb_featured_image_src":{"full":["https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/All-in-one-WP-Security-1-1.png",720,540,false],"thumbnail":["https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/All-in-one-WP-Security-1-1-150x150.png",150,150,true],"medium":["https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/All-in-one-WP-Security-1-1-300x225.png",300,225,true],"medium_large":["https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/All-in-one-WP-Security-1-1.png",720,540,false],"large":["https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/All-in-one-WP-Security-1-1.png",720,540,false],"1536x1536":["https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/All-in-one-WP-Security-1-1.png",720,540,false],"2048x2048":["https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/All-in-one-WP-Security-1-1.png",720,540,false],"trp-custom-language-flag":["https:\/\/hanami-web.tokyo.jp\/blog\/wp-content\/uploads\/2024\/05\/All-in-one-WP-Security-1-1-16x12.png",16,12,true]},"uagb_author_info":{"display_name":"\u682a\u5f0f\u4f1a\u793eHanamiWEB \u4ee3\u8868\u53d6\u7de0\u5f79 \u677e\u6d66\u307f\u3055","author_link":"https:\/\/hanami-web.tokyo.jp\/blog\/en\/author\/hanami\/"},"uagb_comment_info":0,"uagb_excerpt":"WordPress\u30b5\u30a4\u30c8\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306b\u4e0d\u5b89\u304c\u3042\u308b\u65b9\u5fc5\u898b\u7121\u6599\u306eAll in one WP Secyruti\u30d7\u30e9&hellip;","brizy_media":[],"_links":{"self":[{"href":"https:\/\/hanami-web.tokyo.jp\/blog\/en\/wp-json\/wp\/v2\/posts\/14119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hanami-web.tokyo.jp\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hanami-web.tokyo.jp\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hanami-web.tokyo.jp\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hanami-web.tokyo.jp\/blog\/en\/wp-json\/wp\/v2\/comments?post=14119"}],"version-history":[{"count":0,"href":"https:\/\/hanami-web.tokyo.jp\/blog\/en\/wp-json\/wp\/v2\/posts\/14119\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hanami-web.tokyo.jp\/blog\/en\/wp-json\/wp\/v2\/media\/14127"}],"wp:attachment":[{"href":"https:\/\/hanami-web.tokyo.jp\/blog\/en\/wp-json\/wp\/v2\/media?parent=14119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hanami-web.tokyo.jp\/blog\/en\/wp-json\/wp\/v2\/categories?post=14119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hanami-web.tokyo.jp\/blog\/en\/wp-json\/wp\/v2\/tags?post=14119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}