We prefer this method, as it allows the front end to work for testing or maintenance
for multiple users (you just need to know their IP address).
You can put this in the top of your .htaccess, and uncomment out the lines as needed (when you want the site to be offline).
If you don't need more than one IP, just enter in the one, uncomment it, and leave the others commented. If you need more IPs, you can just add more lines.
If you are worried about PayPal IPNs being missed, you can allow the PayPal IPs also, you can get the IPs used for IPNs from the PayPal Developer Network.
Put the lines below the ==== in your .htaccess at the top.
Create a .php or .html file to redirect too.
When you need to activate it, uncomment out the lines as indicated
========================
# Create a maintenance.php file to show your users that your site is offline
# Can be maintenance.html if you wish also if you create and change the line below
# If ONLINE, all the lines in the block below should be commented
# If OFFLINE, edit in desired allowed IPs and uncomment
# Uncomment lines below as needed.
#Options +FollowSymLinks
#RewriteEngine On
#RewriteBase /
#RewriteCond %{REMOTE_HOST} !^123\.123\.123\.123
#RewriteCond %{REMOTE_HOST} !^123\.123\.123\.123
#RewriteCond %{REMOTE_HOST} !^123\.123\.123\.123
#RewriteCond %{REQUEST_URI} !/maintenance.php$
#RewriteRule $ /maintenance.php [R=302,L]