Apache User Authentication issue.pls help
I'm trying to restrict access to a directory on my apache webserver. Before I go into detail I'll show what I've got so far.
I've successfully created the Password file.
Here's the code in httpd.conf
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
...
...
<Directory />
Options FollowSymLinks
AllowOverride AuthConfig Indexes
</Directory>
...
...
<Directory "C:/Program Files/Apache Group/Apache2/htdocs/thewedding">
AllowOverride AuthConfig
Options FollowSymLinks
</Directory>
Here's the .htaccess file.
"
AuthType Basic
AuthName "test User Authentication"
AuthUserFile "C:/Program Files/Apache Group/Apache2/conf/passwords"
Require valid-user
"
Okay.. looks good right? Well here's the problem. When I open index.html in the root directory, I get prompted for a password. (which I don't want.) If I cancel the authentication request, the index.html is displayed.
When I click the link n the index.html that takes me to the restricted directory, I get prompted again for password, and this time I need it. If I cancel I get the authentication error. If I supply the password I can access the directory.
So my authentication works for the sub directory, but it's also prompting for the root directory although it doesn't authenticate.
Any ideas?
Thanks.