My wordpress website is getting inundated with post requests. It is nearing 200,000 requests a day. I currently am denying all traffic other than my ip address.

Here is a sample of the apache access log:

218.75.48.179 - - [24/Jun/2014:13:16:13 -0700] "POST / HTTP/1.1" 403 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
195.226.235.101 - - [24/Jun/2014:13:16:13 -0700] "POST / HTTP/1.1" 403 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
186.116.184.32 - - [24/Jun/2014:13:16:14 -0700] "POST / HTTP/1.1" 403 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
95.43.217.197 - - [24/Jun/2014:13:16:14 -0700] "POST / HTTP/1.1" 403 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
110.168.188.207 - - [24/Jun/2014:13:16:14 -0700] "POST / HTTP/1.1" 403 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
113.161.194.225 - - [24/Jun/2014:13:16:14 -0700] "POST / HTTP/1.1" 403 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
80.9.11.226 - - [24/Jun/2014:13:16:14 -0700] "POST / HTTP/1.1" 403 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"

I’m trying to block these requests with mod_rewrite while still allowing the wordpress mod_rewrite code to work. What I have so far isn’t properly blocking the requests. Can someone take a look and give me some suggestions?

Here is my .htaccess file:

ErrorDocument 403 "403 Error"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{HTTP_REFERER} ^$
RewriteCond %{HTTP_USER_AGENT} "^Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
RewriteRule ^.* 403 [F,L]
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>`

Read more here: mod_rewrite Blocking user agent post requests with empty referral strings


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , , , , ,

Wordpress related questions and answers: