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).
1 2 |
## Pagina padrao ## DirectoryIndex index.php index.htm index.html pagina.php |
That was easy, right?
To the next.
1 Response
[…] Standard, the Apache Web server, will open the standard file defined by the DirectoryIndex directive (Learn more here). If this file does not exist or does not have a predefined directive, the server will open the […]