1.

Solve : Need help for htaccess file?

Answer»

Hi I try to protect a file for a particular group. I have the following FILES

.htaccess
Code: [SELECT]AuthUserFile /login/.htpasswd
AuthGroupFile /login/.htgroup
AuthType Basic
AuthName "Admins only"
<Files "design.psd">
require group admins
</Files>

.htpasswd
Code: [Select]user1:bTlnarEb0Do/2
user2:bTlnarEb0Do/2
.htgroup
Code: [Select]admins: user1
users: user1 user2
However I get a requist to enter my username and password, it is never RIGHT. I ALWAYS get the error MESSAGE wrong username/password.

How can I fix this problem

I do have another question, is it possible (in php) to see from which user on the .htaccess there is logged in. For example if I use the username blabla and logged in I would see welcome, blabla and if I log in with bla2 I would see welcome bla2. If it's possbile, how should you do this then?
Get rid of the AuthGroupFile and require group lines.  They relate to Unix/Linux groups, and I don't think they're what you're intending  You don't need the .htgroup file, I don't think.



Discussion

No Comment Found