WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Site under construction page while working with WordPress (7 posts)

  1. krimsly
    Member
    Posted 5 years ago #

    Greetings all.

    I'd like to have a static (non-Wordpress) html page that site visitors will see if they browse to my domain--an "under construction" page.

    At the same time, I want to be able to get to my WordPress site so I can continue to make changes and see the results. So, browsing to http://www.mydomain.com/index.php would bring up my WordPress site, but http://www.mydomain.com would bring up the static HTML "under construction" page.

    I've tried adding "DirectoryIndex index.htm index.php" and also "DirectoryIndex index.htm" to the .htaccess file in the WordPress root directory. But, it seems that WordPress ignores that directive and displays index.php instead which brings up the WordPress site.

    Does anyone have a solution to this problem?

    Thanks

    NorthK

  2. Zayfox
    Member
    Posted 5 years ago #

    redirect 301 http://www.mydomain.com http://www.mydomain.com/index.php

    Place that in your .htaccess file. By your post, you didn't put redirect 301, which means permanent redirection.

    If that doesn't work, maybe try this:
    redirect 301 index.html http://www.mydomain.com/index.php

    Try .html, .htm, .php, .aspx with the second code.

  3. krimsly
    Member
    Posted 5 years ago #

    Hi Zayfox,

    Thanks for your reply. I'm wondering if setting up a permanent redirect will affect Google results once the site is complete though. At that point, I will be taking out the redirect, getting rid of the static HTML page and always going to WordPress.

    Thanks,

    NorthK

  4. ClaytonJames
    Member
    Posted 5 years ago #

    I like this plugin.

    Maintenance Mode

    Very simple and straight forward. Message can be easily customized, and allows an admin to work on the site while the page is up.

  5. krimsly
    Member
    Posted 5 years ago #

    Thanks Clayton.

    I'm wondering if there's a way to do this in .htaccess or some other system-level approach, w/o using a plug-in. I read the comments on the Maintenance Mode plug-in and some people reported having problems with it...

    -NorthK

  6. whooami
    Member
    Posted 5 years ago #

    I'm wondering if there's a way to do this in .htaccess

    yes there is. in fact there are a cpl ways.

  7. Zayfox
    Member
    Posted 5 years ago #

    What you're looking for is a 301, or permanent redirect. I believe bots such as the google spider can read the difference between a permanent and temporary redirect, and therefore would show up on google as you want it.
    If you redirected your root folder to, say, a file called Zayfox, then googling your site's root should come up with the Zayfox file. Using the code I provided earlier will work.

Topic Closed

This topic has been closed to new replies.

About this Topic