Mobile app version of vmapp.org
Login or Join
Murray432

: How can I redirect any kind of access to my site to somewhere else, except for me? My site, www.example.com has a MyBB forum installation, and has many users constantly checking it out. I

@Murray432

Posted in: #Godaddy #Redirects #SiteMaintenance

My site, example.com has a MyBB forum installation, and has many users constantly checking it out. I would like to make a major change to it - basically, I want to delete everything it has and start clean.

However, this rebuilding process may take me hours since I need to do a lot of things. Thus, whenever an user tries to enter any part of my site (www.example.com, example.com/blog etc), the user will always be redirected to example.com/underconstruction so they can see a nice HTML site explaining the current situation.

But not only that - while I am configuring my site, I need to visit it myself to make sure things do work live. So basically, it has to redirect everyone who isn't me.

Is that possible in any way? I am using GoDaddy hosting.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Murray432

2 Comments

Sorted by latest first Latest Oldest Best

 

@Samaraweera270

Try using .htaccess!

# Turn on mod_rewrite
RewriteEngine On

# If not your IP address
RewriteCond %{REMOTE_ADDR} !^**.**.**.**

# and not the temporary page
RewriteCond %{REQUEST_URI} !^/maintenance.

# redirect to temporary page
RewriteRule /*$ /maintenance.php [L]


I think the above might help you a whole bunch!

10% popularity Vote Up Vote Down


 

@LarsenBagley505

I'd make backups especially of your database if you are starting over. I'm sure you already will though.

To redirect everyone but yourself you can add this to your .htaccess file

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !=123.45.67.89
RewriteRule /*$ /maintenance.php [R=301,L]


This will redirect all users except you to a maintenance.php page

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme