How to manage index files

    October 16, 2019

    How to control the way Apache manages directories. 

    Definition

    You can set the default files Apache looks for when a browser requests a URL that doesn't end in a file name. You can also toggle whether Apache displays the contents of a directory if no default files are found. 

    ATTENTION: If you do not have experience working with .htaccess files, we highly recommend that you contact our support team for assistance. A misconfigured .htaccess file can create major issues for your website.

    Method

    1. Log in to your SiteWorx account.

    2. From the main menu, click Hosting Features > Htaccess.

    3. Click the Index Management link for the directory that you would like to manage.

    4. In the Default Index Files field, type a list of default index files, one file name per line.

      ATTENTION: This setting affects when a browser requests a URL that ends in a back slash, directory. Apache will use this list of files to determine which file to serve and will serve the first file found in the list from top to bottom.

    5. From the Directory Listing drop-down menu, select the desired behavior for when a browser requests a URL that ends in a back slash, directory, and no default index files are found.
      If set to:

      • No: The browser will display a 403 Forbidden message.

      • Yes: The browser will display a list of the contents of the directory.

      • Inherited: The setting will be inherited from a parent directory.

    6. From the Directory Listing Style field, select the desired listing style.
      If set to:

      • Inherited: The directory list will inherit the settings defined for the parent directory.

      • Simple Listing: The directory list will simply include the directory's file names.

      • Fancy Listing: The directory list will include timestamps and file sizes.

    7. Click Update.


    For 24-hour assistance any day of the year, contact our support team by email or through your Client Portal.


    Was this article helpful?

    Send feedback

    Can’t find what you’re looking for?

    Our award-winning customer care team is here for you.

    Contact Support