Need .htaccess redirect that allows viewing of WP install index.php page (6 posts)

  1. mikem42
    Posted 5 years ago #

    Hi, I've currently got a holding index.html page in the root of my domain to which the http://domain.com/ file-less URL currently points while I fiddle with WP in the background.

    However, I cannot see the index.php page of any theme I preview, as the current .htaccess redirect won't allow me to see the WP home page, even if I type in the full address http://domain.com/index.php - the admin theme preview just shows the holding index.html page.

    What code should I use that keeps viewers away from the WP installation, but allows me to see and edit the full WP site in the root? I've sniffed around but can't find what I need. Thanks!

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    Try adding:

    DirectoryIndex index.html index.php

    to the top of your root .htaccess file. That should still allow you to to use http://domain.com/index.php

  3. mikem42
    Posted 5 years ago #

    Thanks Esmi - if I enter ".com/index.php" it's still redirecting to the file-less ".com/" URL which is the index.html file. So I still can't see the index.php page...

  4. Samuel B

    Posted 5 years ago #

    maybe time to consider moving wordpress to a "test" folder to work on it - then move it to root when ready

  5. mikem42
    Posted 5 years ago #

    Thanks very much Samuel - I tried that before and it was a database nightmare, will try with a different domain for now!

  6. Matthew Muro
    Posted 5 years ago #

    There's a plugin that will show a "Coming Soon" page to everyone visiting your site except those who are logged in. It will allow you to work on the site and keep users from seeing your work until you are ready.


Topic Closed

This topic has been closed to new replies.

About this Topic