Solved

Redirect users to 'under construction', but allow client (and myself) to go to root domain and see website

Posted on 2008-10-28
2
185 Views
Last Modified: 2012-08-13
I create blog/CMS websites for clients based on open source CMS. I don't have the money (or the need) for a testing server as I develop the sites.

What I would like to do, is be able to completely develop the website on the root domain, so that when I go to the website address, ie www.example.com, I can see the website in progress. Also, I'd like my client to be able to go there too.

However, besides myself and my client, I don't want anybody else to be able to see the construction. I'd like other users to be shown a 'under construction' page.

I have no idea how to go about this.
0
Comment
Question by:dainberrett
2 Comments
 
LVL 11

Accepted Solution

by:
spoxox earned 500 total points
ID: 22823692
Short of adding a (more difficult) sign in page, etc....

You can try this weak workaround:

Your web server will serve  a variety of different pages by default eg
index.htm
index.html
index.php
default.asp

etc. The specifics are a configuration issue on the server. The order is important!

Create a "fake" index.htm (if that's the first page the server looks for - trial and error if it's a commercially hosted server) that has your "under construction" message.

Make the "real" root of your site something else, e.g. test.htm. This is the page you'll surf to. Later, you'll either rename this page or change your index.htm to automatically redirect to it.
0
 
LVL 82

Expert Comment

by:hielo
ID: 22823706
1. If you and your client have a static ip, then you can check that IP and redirect users to "Under Construction" if request does not originate from those ips:
<?php

switch( strval($_SERVER['REMOTE_ADDR']) )
{
   case "999.999.999.999"://client ip
   case "888.888.888.888"://your ip
        //these are valid IPs so just continue
        break;

   default://all other requests come from invalid IPS
   header("UnderConstruction.php");
   exit;
}

2. You can set up some authentication page and grant access to site content only if user authenticates successfully
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
website content maintenance 3 57
Form submit issue 11 54
FTP File permissions 1 31
Error viewing ASP page 12 97
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now