I have been trying to create a .htaccess file following a tutorial but it is not working.

This is the .htaccess file which i place in the Admin folder.

AuthType Basic
AuthUserFile C:\Program Files\Apache Group\Apache2\bin\userauth
AuthName "Restricted"
<LIMIT GET POST>
require valid-user
</LIMIT>

I then used the command prompt on windows and went through the steps of creating a userauth file in the "bin" section of Apache. But when I checked my error log I got this message.

[Wed Mar 08 11:16:49 2006] [alert] [client 127.0.0.1] C:/Program Files/Apache Group/Apache2/htdocs/skatesite/admin/.htaccess: AuthUserFile takes 1-2 arguments, text file containing user IDs and passwords

I have tried changing where the AuthUser line points but still no luck.

Can anyone help please.
Thanks

    This is just a guess, but I'd say you probably need quotes of some sort around

    AuthUserFile C:\Program Files\Apache Group\Apache2\bin\userauth

    since there's a space in Program Files. Or did you change it to point to a path with no spaces when you were troubleshooting?

      Thats worked in bringing up the box to input user name and password but when i enter them it justs clears the password and wont let me access the admin area.

      Thanks for the first tip.

        Write a Reply...