Forums

need html page to override WP index page (5 posts)

  1. darrelhawes
    Member
    Posted 2 years ago #

    Hi,

    I have an HTML index page installed in the same directory as WordPress. I thought in this case, the HTML file would take precedence, as I had this done so before, by accident.

    In this site I'm working with, the WordPress page is loading instead of the HTML page.

    I'm not ready for the WordPress site to go live yet... so this need is only temporary.

    At any rate, is there a way for force index.htm to over-ride the WordPress file index.php? I still want WordPress to load for the purpose of testing other pages.

  2. jmodjeska
    Member
    Posted 2 years ago #

    Locate (or create) the .htaccess file in your blog's root directory and add the following line:

    DirectoryIndex index.html

  3. darrelhawes
    Member
    Posted 2 years ago #

    That did it!

    Thank you!

  4. darrelhawes
    Member
    Posted 2 years ago #

    OK, strangely enough... it worked at first, or at least I thought it did, then when I tried from a different computer, it did not work.

    Meaning, when going to the root directory (typing in the domain name at my browser)...

    ... the blog index.php loads instead of the index.htm.

    Where else can I check? What can I do to troubleshoot?

  5. whooami
    Member
    Posted 2 years ago #

    what you were provided works. its not computer dependent, so youve either cached the site on the second pc.. or you changed the .htaccess back to pre edit.

    Its simpler to do this if you dont call the other file index.html -- call it splash.html os something like that, and edit the .htaccess to match the updated file name.

    why? because nearly every browser has auto-complete these days.. and this will prevent your browser from "autocompleteing" index.php for you.

Topic Closed

This topic has been closed to new replies.

About this Topic