#These mod_rewrite security directives are for WordPress installation on a Server using Apache. #These directives should be placed within .htaccess file that is within the main WordPress installation. RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^(Inoreader|Inoreader(.*?)|Feedly|Feedly(.*?)|GPTBot|GPTBot(.*?)|Nutch|PetalBot|Dispatch|Krzana(.*?)|Sogou(.*?)|SeznamBot|BLEXBot(.*?)|ZoominfoBot|CipaCrawler(.*?)|AhrefsSiteAudit(.*?)|DotBot|DotBot(.*?)|SemrushBot|SemrushBot(.*?)|SiteExplorer(.*?)|SurveyBot|GarlikCrawler|AhrefsBot|MJ12bot|MJ12bot(.*?)|coccocbot(.*?)|Baiduspider|archive(.*?)|archive.org_bot|ia_archiver|EasouSpider|SearchmetricsBot(.*?)|linkdexbot(.*?)|PaperLiBot(.*?)|Mail.RU|Mail\.RU_Bot|LexxeBot|DeuSu)$ [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^-?$ RewriteRule ^(.*)$ - [F,L] RewriteCond %{HTTP_USER_AGENT} ^$ [OR] RewriteCond %{THE_REQUEST} HTTP/1\.0$ [OR] RewriteCond %{SERVER_PROTOCOL} HTTP/1\.0$ RewriteRule ^(.*)$ - [F,L] RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC,OR] RewriteCond %{REQUEST_URI} "(test|a-zA-Z|/\/\/\/\|/\/\x|\$\+|\?\:)" [NC] RewriteCond %{SCRIPT_FILENAME} -d [OR] RewriteCond %{SCRIPT_FILENAME} -f RewriteRule "(^|/)\." - [F] RewriteCond %{REQUEST_METHOD} ^TRACE [NC] RewriteRule .* - [R=405,L] RewriteCond %{QUERY_STRING} http\:\/\/www\.google\.com\/humans\.txt\? [NC,OR] RewriteCond %{QUERY_STRING} (img|thumb|thumb_editor|thumbopen).php [NC,OR] RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR] RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR] RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) RewriteCond %{QUERY_STRING} (;|'|"|%22).*(union|select|insert|drop|update|md5|benchmark|or|and|if) [NC,OR] RewriteCond %{QUERY_STRING} (localhost|mosconfig) [NC,OR] RewriteCond %{QUERY_STRING} (boot.ini|echo.*kae|etc/passwd) [NC,OR] RewriteCond %{QUERY_STRING} (javascript:).*(;) [NC,OR] RewriteCond %{QUERY_STRING} (boot.ini|echo.*kae|etc/passwd) [NC,OR] RewriteCond %{QUERY_STRING} "(test|a-zA-Z|/\/\/\/\|/\/\x|\$\+|\?\:)" [NC] RewriteRule .* index.php [F]