Click to See Complete Forum and Search --> : htaccess password protection


Sid3335
06-27-2006, 04:57 AM
Hi Guys:

I have wamp running on windows XP, i access my root using http://locahost.

the directory is C:\wamp\www.

i have a sub directory called cms within the www.

in the cms folder i have an .htaccess & .htpasswd file.


AuthType Basic
AuthName "Restricted Directory"
AuthUserFile /.htpasswd
Require valid-user

and

admin:44e3sjT6uByps


when i go to http://localhost/cms the login prompt appears and asks for my user name and password. so the .htaccess file is working as it should.

unfortunately it does not accept my login attempts and states authentication failure.

i think its not seeing my .passwd file, but i have no idea. it could be the AuthUserFile not being set correctly.

what should i have in here? are there any other reasons why this shouldn't work?

thank guys

Ness_du_Frat
06-28-2006, 03:09 PM
HI !!!
Maybe I'm totaly out of the point, but when you put your file on the server, did you transfer it in ASCII ?
Are you sure you don't have any white spaces anywhere on your .htaccess and .htpasswd files ?
(I'm pretty sure you checked all that first, but a similar thing happened to me for those reasons...)

aqau
07-02-2006, 02:22 PM
You need to change the path to your .htpasswd file so it is relevance to your serverroot directory. It looks to me like you need to change it to:

AuthUserFile /cms/.htpasswd

Crazy Heart
02-12-2007, 10:05 AM
I have the same problem.
the .htaccess file is in the C:\Program Files\EasyPHP1-8\www\teiguide so I type
AuthUserFile /teiguide/.htpasswd but no luck!