|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Cannot get .htaccess and .htpasswd to function
I cannot get .htaccess and .htpasswd to function. The login dialog box pops up but never authenticates the password (username and password generated via a website that offers such). Does the folder itself need a CHMOD to something specific? I've read everything from 777 to 755 to 644 for the two .ht files all of which I've tried but can't make work.
Thanks for any help you can give. |
|
#2
|
||||
|
||||
|
As with your other post, this is something you'll probably need to work out with your hosting company. Could be that the password generated by the Web site you mention is formatted differently than what your host is expecting -- only the host can tell you what's required for their particular setup.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#3
|
|||
|
|||
|
In your .htaccess file you want to have something like this:
PHP Code:
The second line (AuthName) is simply the name the popup will display. The AuthUserFile line is a path to a file with your username and password combos. To create a password file and add a username/password combo use the htpasswd program: htpasswd -cb /home/.htpasswds/passwd myuser 444444 Where /home/.htpasswds/passwd is the password file, myuser is the username and 444444 is the password.
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
|
#4
|
|||
|
|||
|
The problem is due to differnet encryption algorithm used those by htpasswd for password generation and by http server for authentication. you can use the following perl script to gererate username/password pairs.
http://www.cse.iitd.ernet.in/~csd00377/misc/addpw.pl regards, |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Server Configuration > Cannot get .htaccess and .htpasswd to function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|