Htaccess-problem: protect wp-admin folder and wp-login.php
-
Hi
I have a problem with securing the folder wp-admin AND the file wp-login.php. Both should be secured with the same user and password. This also works. Only unfortunately, for example, when logging out of wordpress again name and password (Htaccess) is required. I also know why, but I would like to solve the problem.
I have in the folder wp-admin the two files .htaccess and .htpasswd, as it is normal. In it is specified among other things name and password of the user. If you call the website with /wp-admin, you will be asked for name and password. After correct input you get into the CMS. If you log out, you will be asked for name and password again – if you don’t do this, you stay logged in, which is useless. This is probably because in the .htaccess file I have also secured the file wp-login.php like this:
<Files wp-login.php>
AuthName “admin-area”
AuthType Basic
AuthUserFile /(…)/htdocs/.htpasswd
require valid-user
</Files)
With (…) I have only abbreviated the path here in the forum.
This protection works, but I suspect that by “logging out” the file wp-login.php is called exactly and therefore exactly this protection starts.
How do I manage that both the folder wp-admin and the file wp-login.php is equally secured for one and the same user, but this double login or logout is not necessary?
- The topic ‘Htaccess-problem: protect wp-admin folder and wp-login.php’ is closed to new replies.