Setting the default file upload order with .htaccess (Apache)

Views: 597
Reading Time: <1 minute

Dear readers,
Good night!

This post will be quick, but very useful for those just beginning to learn more about the Apache web server and its configuration file. .htaccess.

Today I am going to show you how to set the default Apache page load order, that is, when you simply enter the site domain, which file Apache will open. By default, the file is index.html, but this can easily be changed as needed.

Using the code below, we set the default page to be index.php. If this file does not exist, the next file in the list (index.htm) will be loaded and so on until it reaches the last file in the list (page.php). If this last file does not exist, apache will reproduce an error in your site's visitor browser (Error 403 - Forbidden).

That was easy, right?
To the next.