Mobile app version of vmapp.org
Login or Join
Cody1181609

: How is the hierarchy of .htm/.html/.php decided? 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

@Cody1181609

Posted in: #WebDevelopment

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Cody1181609

1 Comments

Sorted by latest first Latest Oldest Best

 

@Deb1703797

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme