Recently I was doing my first Magento project and had to set coming soon page but the problem was if I set that so there will be problem for me and my client to see the progress so I came across the following code

Toggle Title
if ($_SERVER[‘REMOTE_ADDR’]!==’′) {
header(“Location: /comingsoonpage.html”);

but It didn’t work for me  so I came up with my code and its working perfectly for me and I hope it will work you as well

Toggle Title

if (($_SERVER[‘REMOTE_ADDR’] != ‘’) && ($_SERVER[‘REMOTE_ADDR’] != ‘yyy.yyy.yyy.yyy’))
require ”comingsoonpage.html’;

1. In you can put your IP address and in yyy.yyy.yyy.yyy you can put your client IP.

2. In require ‘comingsoonpage.html’;  it points  name of my Coming Soon page so replace your page name with with its extension like ‘comingsoonpage.html but make sure it will be uploaded in your root directory.

Now Copy this code after adding IP and page name and paste it into your root index.php file after the first <?php  tag.

So just you and your client will be able to to see the website and the whole world will see the Coming Soon Page.