Server Administration & Management

How to Enable/Disable Directory Listing in .htaccess

If you want list all the file that are present under certain directory then you will need to enabled directory listing that be be done in your .htaccess file as fallows.

1) Edit your .htaccess file and put following code

Options +Indexes

2) save and exit. Now you are done.
Eg: http://yourdomain.com/test

All files under test directory will be listed into browser.

If you want to disable it then enter following line in .htaccess

Options -Indexes

February 3, 2011 - Posted by | Apache, htaccess | , ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: