IndexIgnore vs Options -Indexes

Started by certforumz, July 08, 2017, 12:54:52 AM

Previous topic - Next topic

certforumz

If you want some files to be shown in the directory listing but don't want to show some other files, you can use IndexIgnore keyword in the htaccess file.
If you dont want to enable indexes (files showing up in the directory) then use Options -Indexes.

Example:
An .htaccess file with "IndexIgnore *" shows blank page as you dont want to show any file in the directory.
An .htaccess file with "IndexIgnore */.exe hides files with .exe extension from showing up in the directory listing.

It is recommended not to show any directory contents using Options -Indexes directive in .htaccess file. Note that there is no file extension to .htaccess file.

Source: https://stackoverflow.com/questions/14062641/indexignore-or-options-indexes