PDA

View Full Version : .htaccess problems


nyarlethotep
01-24-2007, 12:18 PM
I'm having problems getting HTTP authentication working on a website. I've done this kind of thing plenty of times before, which is why it's so darn frustrating this time around.

The .htaccess file reads as follows:

AuthUserFile c:/web/passwords/.htpasswd
AuthName "Site Administration"
AuthType Basic

<Limit GET>
require valid-user
</Limit>

The htpasswd file reads something like (with appropriate encryption):

myusername:mypassword

The .htaccess file is finding the password file fine. I've tried leaving the password blank, and when I do this I can login with just the username.

The problem seems to be with the password encryption. I've used various online tools to encrypt the password and so far I've had no joy. If anyone can help, it would be much appreciated.

This site is on a Windows Server 2003 box running Apache 2.2.3.

nyarlethotep
01-25-2007, 09:35 AM
It was the version of Apache I was running. It seems to be mightily strict about how the password is encoded. In the end I used the htpasswd.exe in Apache's bin directory and got a hash that worked perfectly.

Just thought you might like to know in case you have similar problems. :)

chrisranjana
02-05-2007, 11:01 AM
myusername:mypassword

Which online tool did you use to create the mypassword initially ?