Site opens DIrectory Listing and not index.html

Website URL


All the files are inside the htdocs folder and I have an index.html file with some other subfolders there. how can I let connect it to the index file?

Add this to your .htaccess :-

#Prevent Directory Browsing
Options -Indexes
DirectoryIndex index.html


In your .htaccess file, you define the following line:

DirectoryIndex first.html

This means that the server will look for a file first.html. If it can’t find it, it will show a directory listing.

If you want to use index.html instead, you can just remove this line from your .haccess file.


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.