On most servers, when a visitor accesses a directory (rather than a page) on your web site, the browser typically displays the directory’s index page.

If no index page exists, the browser displays a list of the files in that directory.

Customers can use the Indexes interface to define how the server displays a specific directory’s index to a visitor, or to disable index display for a directory.

 

To configure your directory settings

Click Settings, and then select one of the following locations in which to begin navigation:

  • WebRoot — Begin navigation in the document root for the account’s primary domain.
  • Document Root for — Select the domain that corresponds to the document root in which you wish to begin navigation.

To configure the interface to always open your selection from Step 1, select the Always open this directory in the future check-box.

Click Save Changes.

Navigate to the desired folder with the following:

  • To navigate into a folder, click the folder icon ().
  • To navigate up one level of the directory tree, click Up One Level at the top of the list of directory contents.
  • To select a directory, click that directory’s name.

Select one of the following options:

  • Default System Setting — cPanel uses the default that your hosting provider defines.
  • No Indexing — The server does not list the contents of the directory. Browsers display a message that states that the contents are forbidden.
  • Standard Indexing — The server lists the directory’s contents as filenames only.
  • Fancy Indexing — The server lists file names and additional information, such as file size and time last modified.

Click Save.

 

You can also use the .htaccess file in your domain's folder to disable directory indexes throughout your entire site.

Just add the following to your .htaccess file.


Options -Indexes
	
Răspunsul a fost util? 0 utilizatori au considerat informația utilă (1 Voturi)