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
186 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…

863 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

23 Experts available now in Live!

Get 1:1 Help Now