Author Topic: IndexIgnore vs Options -Indexes  (Read 442 times)

Offline certforumz

  • Cert Exams
  • Administrator
  • Hero Member
  • *****
  • Posts: 847
  • Ask me a question ...
    • CertExams - CCNA, A+, Network+, and Others
IndexIgnore vs Options -Indexes
« on: July 08, 2017, 12:54:52 AM »
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
« Last Edit: July 08, 2017, 01:05:08 AM by certforumz »