Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running a wamp server on a windows xp box.

I have a .htaccess file that contains

AuthType Basic
AuthName "restricted area"
AuthUserFile C:/wamp/www/.htpasswd
require valid-user

and a password file .htpasswd


password = password

The .htaccess file sits in a subdir called "NewCats" (the folder im trying to protect) and the password file sits in the root dir (i tried it in the newcats folder and it didn't work there either.

the document root is


so what am i doing wrong? (also i used this site to create the hashes

share|improve this question
up vote 1 down vote accepted

One possibility is the following :

On Windows the paths use a backslash (\) and not a slash (/).

Try editing your .htaccess to match this.

AuthUserFile C:\wamp\www\.htpasswd

You also have to be sure that auth_basic_module is activated in Apache and that your .htaccess doesn't end with the txt extension !

share|improve this answer
sorry about the delay but auth_basic_module is in place (the page does prompt me) and ive reveresed the slashes and it diffiently doesnt end in .txt but im still not getting in with the name and password – Crash893 Aug 26 '10 at 18:34

Make sure AllowOverride None isn't set. It ignores .htaccess files that way. Make it read AllowOverride AuthConfig.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.