location ~* /(wp-login\.php|administrator|admin\.php) { set $humantest 0; if ($http_cookie !~* "humans=checktest") { set $humantest 1; } if ($args ~* (callback|logout|lostpassword)) { set $humantest 0; } if ($humantest = 1) { add_header Content-Type text/html; return 200 "<html><body><script>document.cookie='humans=checktest;path=/';location.reload();</script></body></html>"; } error_page 404 = @fallback; }