WordPress brute force mod_rewrite – with nginx?

I’ve read about a reliable method to protect my WordPress site against brute force attacks, however it’s for Apache mod_rewrite, and I’d like to use this with Nginx…

RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} ^(|.*/)wp-(admin|comments-post|login|signup) [NC]
RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://%{REMOTE_HOST}/$ [R=302,L]

Could someone help to “convert” this to nginx?

Related posts

1 comment

  1. Add the following code to bottom of your functions.php in theme folder it will stop the ping back request.

    add_filter( 'xmlrpc_methods', 'remove_xmlrpc_pingback_ping' );
    function remove_xmlrpc_pingback_ping( $methods ) {
    unset( $methods['pingback.ping'] );
    
    return $methods;
    }
    
    [enter link description here][1]
    

Comments are closed.