0

I've got a WordPress site which is failing to do the login redirect. I think it has to do with the DB charset. The access log:

IP - - [09/Mar/2017:11:42:34 +0000]

"GET /wp-admin/ HTTP/1.1" 302 4405 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"

IP - - [09/Mar/2017:11:42:35 +0000]

"GET /wp-login.php?redirect_to=https%3A%2F%2Fanimalcare-clinic.com%2Fwp-admin%2F&reauth=1 HTTP/1.1" 404 21262 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"

And I guess those %3A bits should be / so that's why its breaking. Any ideas how to fix this? Thanks.

1 Answer 1

0

There is something issuing a 302 redirect from wp-login.php, I do not believe this is due to the DB charset, but some sort of login blocker.

The image below is the headers that are sent back to a request to wp-login.php.

wp-login headers

I am seeing a WWW-Authenticate header with a realm of "WCUK Password Protected Area" I could not find a plugin that uses those letters, can you edit your post to add the .htaccess file so we can see what is in there?

4
  • Hiya thanks for your reply, yeah I have implemtend server wide password protection of wp-login, with this in my httpd conf: <Files wp-login.php> AuthType Basic AuthName "WCUK Password Protected Area" AuthUserFile /var/www/htpass/.htpasswd Require valid-user but i have a hundred other WP sites on this server all the same and they work fine, its just this 1/100 that is breaking and I cant work out why, so tried to look at differences.
    – anarki
    Commented Mar 10, 2017 at 12:56
  • @anarki can you post the contents of that? or try deactivating that to see if it causing the redirect?
    – Ben Casey
    Commented Mar 10, 2017 at 13:03
  • Hiya, yeah if I remove this htpass code it does fix the redirect on this site. But i need to keep it in place because this server is constantly hammered by brute force attempts.
    – anarki
    Commented Mar 13, 2017 at 12:25
  • @anarki Shot in the dark, but try this: ErrorDocument 401 default in your htaccess. (Source)
    – Ben Casey
    Commented Mar 14, 2017 at 5:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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