4

If I have a folder with files named index.html, index.htm, and index.php how it is decided which one will be used if you only list the URL to that folder? Is that something you can chose or is that up to the host?

BillyNair
  • 234
  • 1
  • 8

1 Answers1

4

If using Apache, it's the order the filenames are given in the DirectoryIndex directive. WAMP's default is

<IfModule dir_module>
    DirectoryIndex index.html index.php index.php3 index.htm
</IfModule>

where index.html will be served if it exists, then index.php, and so on.

msanford
  • 412
  • 4
  • 13