• Resolved krimsly

    (@krimsly)


    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

Viewing 6 replies - 1 through 6 (of 6 total)
  • zayfox

    (@zayfox)

    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.

    Thread Starter krimsly

    (@krimsly)

    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

    Clayton James

    (@claytonjames)

    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.

    Thread Starter krimsly

    (@krimsly)

    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

    whooami

    (@whooami)

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

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

    zayfox

    (@zayfox)

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Site under construction page while working with WordPress’ is closed to new replies.