This rule tells the server to search for and serve “business.html” as the default directory index. This rule must exist in the htaccess files of the root directory for which you wish to replace the default index file (e.g., “index.html”):

# serve alternate default index page
DirectoryIndex business.html

This rule is similar, only in this case, the server will scan the root directory for the listed files and serve the first match it encounters. The list is read from left to right:

# serve first available alternate default index page from series
DirectoryIndex filename.html index.cgi index.pl default.htm

Facebook
WhatsApp
Twitter
LinkedIn
Pinterest

Leave a Comment

Your email address will not be published. Required fields are marked *

Related Articles from the Series

Common Image WpDeveloperTips
Important Notes for .htaccess
As a configuration file, .htaccess is very powerful. Even the slightest syntax error (like a missing...
Common Image WpDeveloperTips
Commenting .htaccess Code
Comments are essential to maintaining control over any involved portion of code. Comments in .htaccess...
Common Image WpDeveloperTips
Htaccess Definition
Apache server software provides distributed (i.e., directory-level) configuration via Hypertext Access files....
Common Image WpDeveloperTips
Secure Directories by IP Address and/or Domain
In the following example, all IP addresses are allowed access except for 12.345.67.890 and domain.com:...
Common Image WpDeveloperTips
Redirect Old Domain to New Domain via .htaccess
When you migrate a site from one domain to another, it is very important that you don’t break all the...
Scroll to Top