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 9261 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.

Let's Talk!

US:   +1.443.282.1572

PK:   +92.345.190.1523

Let's Skype


  • Tahir Rasul is an EXCELLENT resource for my company. I highly recommend his work and will be happy to endorse his skills.If you are thinking of hiring Tahir, I will be happy to verbally confirm what I have written here.


    Len Foley.


    CEO New Horizon Health, Inc.