I need to put a important client’s website into maintenance mode. I want redirect (or serve a static html) all vistors except 2 IPs so we can continue to access the website while we work on it.
Is there a way to do this with a .htaccess file?
I known I could easily do this with php and headers but I will be working with the PHP code a lot, so many of times the users will get a PHP error before getting redirect.
Also, Google bot visits this website very often. Is there a way to tell bots that the website is temporary down so they don’t index the “Please come back later” massage? (a header code maybe?)
Thanks
Here is a great article from SEOmoz
http://www.seomoz.org/blog/how-to-handle-downtime-during-site-maintenance
It is a nice step by step explanation and I think it is just what you are looking for. It tackles the SEO side of things and also explains how to use your htaccess to serve the proper HTTP status code.