PDA

View Full Version : Protecting Directories



tnas
10-15-2003, 11:00 AM
On the WWW6 server, directories could not be browsed.. if you put in yourdomain/folder you got a 403 forbidden. On the new DA server I am getting the folder listed. What do I need to do to protect the folder? What setting do I need?

pmatt
10-15-2003, 12:41 PM
Create a file called '.htaccess' (note that there's nothing before the dot) in the root directory of your site, and add the following line to it:

Options -Indexes

This will prevent any directory indexes from being displayed.

Hope this helps.

tnas
10-15-2003, 01:15 PM
OK, that worked fine....almost. I received the following error. I notice the error pages are "editable" in DA, but I haven't edited them. Do I get an error page by default, or do I HAVE to make one. It should have returned a default 403 page.


Forbidden
You don't have permission to access /~diratslabs/phpform/forms/ on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.