?
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
Medium Priority
?
191 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 2000 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses

801 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