How do I enable directory indexing?


When you create a directory on your hosting account and do not create an index page for that directory, the default is to provide you with a Forbidden page.

If you would rather see the files that are in that directory, you can edit the .htaccess file to do so.

You can edit your main .htaccess file, which means that you will be able to see all the files in all the directories that do not have an index page.  Or you can create a new .htaccess file for that particular directory.

To edit your main .htaccess file:

  1. Download the .htaccess file from your account. If you do not have one, you can create one.
  2. Open the file in your text editor.
  3. Add the following line:

options indexes

  1. Save the file.
  2. Upload it back to your web account.
  3. If you are creating a new file, you may need to rename it from .htaccess.txt to just .htaccess
  4. All the directories will now show the files.

To create a new .htaccess file for the directory:

  1. Open a new file in your text editor
  2. Add the following line:

options indexes

  1. Save the file
  2. Upload it into the directory
  3. You may need to rename it from .htaccess.txt to just .htaccess
  4. Set the permissions for the directory to 755
  5. You will now see all the files


Article ID: 486
Created On: Tue, Mar 17, 2015 at 3:48 PM
Last Updated On: Thu, Apr 23, 2015 at 12:48 PM

Online URL: https://www.heartinternet.uk/support/article/how-do-i-enable-directory-indexing.html