0

I recently was looking at my web server logs, and I saw something like this:

"GET /login HTTP/1.1" 301 448 "-" "Python-urllib/2.7"
"GET /login HTTP/1.1" 302 4563 "-" "Python-urllib/2.7"
"GET /wp-login.php HTTP/1.1" 403 3982 "-" "Python-urllib/2.7"

My wordpress installation is a little bit different, and I use certificates to protect the wp-login.php file and wp-admin directory. So without the certificate, you will be redirected to the main page, unless you are a bot like in this case.

The solution works fine, but I want to eliminate the extra queries you see above. So the question is how to remove the login alias, so the login page would appear only when you type wp-login.php.

1

This is the result of a default action, so you can remove it in a plugin with:

remove_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );

You could also just block Python-urllib in your server configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.