File Protection using .htpasswd

39 Views Asked by At

I'm running a small private wordpress blog and would like to protect the wp-login.php using .htaccess and .htpasswd. I'd like to be promoted by a additional password prompt when trying to access the wp-login.php file.

Using this in my .htaccess works but obviously makes my whole site.

 AuthName "Zugangpasswort"
 AuthType Basic
 AuthUserFile  (path)/.htpasswd
 require valid-user

But I can be sure everything points in the right direction. But after pointing to a given file, nothing happens.

<Files  wp-login.php>
 AuthName "Zugangpasswort"
 AuthType Basic
 AuthUserFile  (path)/.htpasswd
 require valid-user
</Files>

There is no kind of error message nor any password prompt when trying to access wp-login.php. Htaccess and htpasswd are in the same folder with the file I'm looking to protect. I cleared the browser cache and used private windows. Any ideas?

(I'm a complete newbie with all kind of this tings... Sorry, if I made a dumb mistake)

0

There are 0 best solutions below