0

I have IdeaWebServer and I try to secure files by the .htpasswd. When I try to acces my page the login window doesn't show up. Here is my .htacces code

AuthType basic
AuthName "Login"
:Location /users/www/domain.com/wp-login.php
AuthUserFile /users/www/.htpasswd
Access allow all valid-user
:Location
ErrorDocument 401 "Denied"
ErrorDocument 403 "Denied"
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

and .htpasswd user:passwordcodedinmd5

Is that correct?

  • Just to clarify, the login window is `/users/www/domain.com/wp-login.php`? What URL you use to access it? – orique Nov 18 '13 at 11:39
  • I forgot to tell that's a wordpress directory. I want an addictional login window from .htacces. This should reduce the wp-login brute force attacks. I use URL `domain.com/wp-login.php` – user3004313 Nov 18 '13 at 12:51

1 Answers1

0

try to this code in htaccess file

AuthName "Restricted Access"
AuthType Basic
AuthUserFile  file path/.htpasswd
require valid-user
Pravin Vavadiya
  • 3,195
  • 1
  • 17
  • 34