can get it work htpasswd
Question
i can get the .htpasswd to work with .htaccess
I have the following lines in htacess
<Files ".htaccess">
order allow,deny
deny from all
</Files>
AuthUserFile /var/www/example/.htpasswd
AuthName "Restricted Area"
AuthType Basic
Require valid-user
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ /index.php/$1
and htpasswd look as it follows
user:passw
<Files ".htpasswd">
order allow,deny
deny from all
</Files>
I'm trying to log in but without success apache error.log tells "/": Password Mismatch but I have been checking couple of times everything is okay with it.
Solution
password are manipulated using htpasswd utility
see: http://linux.die.net/man/1/htpasswd
Your case can be:
htpasswd -c /var/www/example/.htpasswd user
OTHER TIPS
Try and generate passwords using the site: htpasswd-generator and also put the file outside the web root directory of the site not inside it.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow