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
189 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ebay messages api 6 40
Understanding UserAgent String 2 70
.CSS HTML Help 3 57
Word Press Fixes to Google Speed Test Issues 2 50
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

732 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