Stingreen
03-14-2002, 11:00 PM
Guys, I've been trying to figure out how to hide a specific folder behind a username-password pop-up.
However I can only do it for an entire site,
for instance, if I type www.domain.com then it prompts for username password, but I want it for the folder, www.domain.com/folder. The second thing is, even I succeeded on prompting the password, it doesn't accept my password..
Arrghh... what is going on??
Here is what I did step by step,
First I telneted to the server,
then created the .htaccess file under /home/sites/siteXX/web/.htaccess
It includes the following lines,
require valid-user
Authname "My Protected Page"
Authtype Basic
AuthUserFile /home/sites/siteXX/web/the_folder_I_wanna_protect/.htpasswd
Then executed the htpasswd command
/usr/bin/htpasswd -c /home/sites/home/users/.htpasswd username
It prompts password for the whole site, where am I wrong, any ideas greatly appreciated..
Thank you.
However I can only do it for an entire site,
for instance, if I type www.domain.com then it prompts for username password, but I want it for the folder, www.domain.com/folder. The second thing is, even I succeeded on prompting the password, it doesn't accept my password..
Arrghh... what is going on??
Here is what I did step by step,
First I telneted to the server,
then created the .htaccess file under /home/sites/siteXX/web/.htaccess
It includes the following lines,
require valid-user
Authname "My Protected Page"
Authtype Basic
AuthUserFile /home/sites/siteXX/web/the_folder_I_wanna_protect/.htpasswd
Then executed the htpasswd command
/usr/bin/htpasswd -c /home/sites/home/users/.htpasswd username
It prompts password for the whole site, where am I wrong, any ideas greatly appreciated..
Thank you.
