Saturday, 03 August 2013 08:45

Trick: Force Open Index.html instead of index.php

Written by
Rate this item
(0 votes)

Often you find yourselves in a situation where you want an HTML file to load prior to a PHP file in the root of your website, and by default if two files have similar names, the one with .html should load automatically. However, some servers force the loading of .php file before .html. 

If you care caught up in such a situation and are looking to load your .html file ( for any splash page or flash page etc ), add the following ONE line in your .htaccess file and thats it. 

DirectoryIndex index.html index.htm index.php

I hope this helps someone. 

Read 8177 times Last modified on Saturday, 03 August 2013 08:49

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.

What People Are Saying About Me

A diverse array of expertise to enrich your online presence, provides great flexibility as well as ease of use and swift customization.