Category: HTML

Added: 8th of April 2024

Viewed: 207 times


Prioritising index.html over index.php as your index page using the DirectoryIndex directive in your .htaccess file

Sometimes you might want to create a static index.html landing page for your website. From experience it is usually set as index.php

So that visitors land on index.html instead of index.php you need to add the DirectoryIndex directive to your .htaccess file

The .htaccess file can be found in the root directory on your webspace.

In your .htaccess file, simply add the following code below and save the file

DirectoryIndex index.html index.php