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 8513 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 is an exceptional resource. It is not often you come across someone as a contractor with his level of communication skills. He is prompt, available and gets done what he says has to be done. I have been impressed with his work to the extent that I have now contracted him to complete much more work with a view to a long term relationship. I would recommend him to anyone looking for a talented Joomla Developer, Project Manager and an SEO resource but also someone who clearly understand web assets and knows how to pull them together.
    The work included extensive Joomla and SugarCRM development and integration!


    Chris Hall.


    HealthWM -