Changing index search order

The following will override default search order for an index file in a directory.

Note the last entry is an error page. Also note the backslash /404.html. The error page Must exist in your web root “/public_html”. The reason that the index entries do not have a “/” is that we assume each subdirectory as a valid index file. This means you need one 404 file for the site. This 404 file will show the error page instead of a directory listing for directories without an index file. Just edit the file called .htaccess and add this line:

DirectoryIndex index.html index.cgi index.php /404.html