Who here knows how to use .htaccess files?

Uber_Tiny

New member
I need some help.

I am having an issue with .htaccess files.

In my .htaccess file for the public_html I have "Options -indexes" so that none of the files in any directory can be seen. I want to allow access to certain directories while password protecting the contents of the folder in that directory. Take for instance I have a folder named "private" in my public_html directory. I placed a .htaccess in that folder with the following;

Options +indexes
AuthType Basic
AuthName private
Require valid-user
AuthUserFile /home/username/.htpasswd/public_html/passwd

The Options +indexes allows for the files to be seen and accessed while all the other files and directories are still protected by the .htaccess in the public_html.

When I do this it prompts for the username and password, but when entered I get a 500 server error. Even if I take out the Options +indexes. If I take out the password protection I can access all files within the folder freely.

What am I doing wrong?
 
Back
Top