Redirect all users to Under Construction Page

  • mista-two-k
  • Beginner
  • Beginner
  • mista-two-k
  • Posts: 57

Post 3+ Months Ago

Hello,

I am planning to transfer all contents of my previous webpage into a new WordPress design. But this is a time consuming process. I need to upload WordPress to my server and
while I am transferring the content, I don't want visitors to see an unfinished page. I am looking for some way to re-direct all links to my website
to a specific under construction page until everything is set up. BUT I still need to be able (only me) to see the updates and changed I do to my site.

In other words, I want visitors to see a specific page no matter what the URL is, and only me to be able to see the whole page.

I'm really sorry for explaining it that bad. You see, I can't even properly explain it in a whole post so there is no way I could Google search that properly :p

Thanks for your help
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

For your website have you considered creating an index.html page and putting whatever "Under Construction" content you want in there? There is a good chance that would display by default when someone visits your website. Then for you if you want to see your site you are working on you would specifically goto index.php like so:

yoursite.com/index.php

If you have a bunch of other links that you also are wanting redirected, but you want it to not redirect for you, then the easiest way I can think of doing this is by using a .htaccess file and basing rules on your IP address where if its not your IP address then it would redirect all pages to the main construction page. An example to doing this would be:

Code: [ Select ]
RewriteEngine On

# this will allow access for one IP
RewriteCond %{REMOTE_ADDR} ^111\.222\.111\.222$
# this sends everyone else to construction.php
RewriteCond %{REQUEST_URI} !^/construction\.php$
# Rewrite, so the full URL is not used.
RewriteRule ^(.*)$ /construction.php [L]
  1. RewriteEngine On
  2. # this will allow access for one IP
  3. RewriteCond %{REMOTE_ADDR} ^111\.222\.111\.222$
  4. # this sends everyone else to construction.php
  5. RewriteCond %{REQUEST_URI} !^/construction\.php$
  6. # Rewrite, so the full URL is not used.
  7. RewriteRule ^(.*)$ /construction.php [L]
  • mista-two-k
  • Beginner
  • Beginner
  • mista-two-k
  • Posts: 57

Post 3+ Months Ago

Thanks a lot Bigwebmaster, I'll try it out tonight and let you know if it works :)

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 70 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.