I've setup Apache 1.3.31 under Windows and I'm trying to password protect a sub-directory on the server (/contacts/). The root directory for Apache is D:\webserver\wwwroot\ I've placed .htpasswd in D:\webserver\ and used this website to encrypt my password. I copied & pasted the output from the website into .htpasswd. I've placed .htaccess in D:\webserver\wwwroot\contacts\ Here it is: Code: AuthUserFile d:/webserver/.htpasswd AuthName EnterPassword AuthType Basic require user simon I've edited httpd.conf and set AllowOverride to All for the root directory. When I browse to http://localhost/contacts/ I am prompted for a password, which I enter, but it seems to think the password is wrong as the password dialogue pops back up again and again?!?!?! I've just tried using another website to encrypt the password, but it still doesn't work
Windows and Unix encryption is different - i think with windows you can just put the password in plaintext in the .htpassword file
Yeah, great isn't it... Just keep the .htaccess file out of the docroot and that'll make it secure enough...
hi there. i tryed this htaccess thing and gues what im having problems with it!!! my .htpasswd is in \\Computer-room\d\server\www\.htpasswd which is the root folder. my .htaccess file is in \\Computer-room\d\server\www\test\.htaccess the code in my .htaccess file is Code: AuthUserFile \\Computer-room\d\server\www\.htpasswd AuthName test AuthType Basic require user evilsprouts im creating the files over a network of 2 computers the computer which the website is served from is called Computer-room please tell me what to do???
Hi, try putting ""s around the paths to the files in your .htaccess file. If that doesn't work then apache may not understand how to grab the files over the network (if i understand your setup correctly).
Nah that don’t work! This is frustrating! Please would u be able to make the files 4 me so I can download them and try??? the root directory is d:\server\www\ the test folder is d:\server\www\test\ The folder which I want to be protected is called test and its URL is http://evilsprouts.no-ip.com/test/ I want hello to be my username and website to be my password If u needs to know anything else about it plz ask me!!!