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 8099 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

Testimonials

  • Tahir has been a great addition to our freelance team. He has completed all of our assignments without any major issues. He has proved to be both accurate and timely; as well as recommending other alternative solutions. Communicates well via email and Skype. He is a most talented technician/programmer and we are so fortunate to have had the opportunity to work with Tahir...and will continue to do so in the future.

     

    Regards, Stephen Patrick.

     

     

    Mullin-Ashley