There are times when you want to disable access to your site. You could simply add a 'deny from all' to your .htaccess page but this gives the end user a ugly forbidden page and makes your site look broken. A better option is to create a nice looking page that explains to the user that your site is under going maintenance and will be back online shortly. You can do this easily if your web server supports mod_rewrite (most do) using the following instructions.
Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !/maintenance.html$ RewriteCond %{REMOTE_ADDR} !^10.0.0.1$ # Change this to your ip address so that you can bypass the redirect RewriteRule .* /maintenance.html [R=307,L]
Your site should now redirect users to the maintenance.html page when they visit your site. Remember that if you added your IP address to the filter that the redirect wont happen when you visit the site. If you want to test the redirect you can comment out that line using a #.