I protect the wp-login.php
file via my .htaccess
file:
<Files wp-login.php>
AuthName "Admin-Bereich"
AuthType Basic
AuthUserFile /*path*/htdocs/.htpasswd
require valid-user
</Files>
Now when I call my website with /wp-admin/
, it asks for username and password which I specified in the .htpasswd
file. After I have entered these correctly, I get to the WordPress login. There I enter my WordPress credentials, i.e. username and password. And even though I enter everything correctly here as well, after logging in I am asked AGAIN for the username and password which I specified in the .htpasswd
file. Why? Only after that I am in the WordPress backend and can work normally.
But normally it should be enough that I enter them once when calling the /wp-admin/
page, then the WordPress login and done? But I have to enter the .htaccess
credentials twice.
What can be the reason for this?
I only use this one .htaccess
file which is in the htdocs
folder. There is NO other .htaccess
in the wp-admin
folder.
Authorization
header as part of the HTTP request.)