Forum Moderators: phranque

Message Too Old, No Replies

Password Protection

in .htaccess

         

stu2

8:40 am on Aug 27, 2005 (gmt 0)

10+ Year Member



Ok, I've tried to follow a tutorial about this but I'm getting an Error 500 with this in .htaccess..

# Password Protection and Group Files
AuthUserFile /.htpasswd
AuthGroupFile /.htgroup
AuthName Dr Who
AuthType Basic
<Limit GET>
require group users
</Limit>

I have both .htpasswd and .htgroup in my root directory. The .htpasswd and .htgroup files are both 1 line respectively..

username:#*$!xxxxxxxx
users: username

Other info.. 1) I generated my password with one of the online password generators. It seems a bit strange that I always get a different password when using the same username/password, and 2) My index file in the root simply does a redirect to a subfolder, and 3) Remove this code and it all works (w/o p/w protection of course).

jdMorgan

3:42 pm on Aug 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> 500 Server error...

When you get this error, what information is logged in your server error log?

Do you have AllowOverride AuthConfig set in httpd.conf?

If you use <Limit GET>, then passwords will only be required for GET, and not for PUT, POST, DELETE, etc. Is that really what you want?

Have you reviewed the Apache Authentication, Authorization, and Access Control [httpd.apache.org] documentation?

Jim