I am about to upgrade my whole site and I am looking for a way to do the maintenance process, but still allowing me to access.
I am thinking of using htaccess. However, that only redirects users accessing for example, index.php to maintenance.php, right? If a user accesses dashboard.php, there will be no redirection.
During the maintenance, I do need to access index.php (ONLY ME).
We are using LightTPD as web server and i am using "mod_magnet" to do such things. Mod_magnet allows me to do request handling using simple lua scripts. We have an automatic task, which will create an empty file somewhere in the web-server's filesystem. The lua script will check for existance of this file on every request and return a static maintenance page, if the file is found. The important part of the script looks like the following:
In the script there's also a configuration to still let specific IP addresses through, so you can still view the website for example from your company network, when everyone else just get's the maintenance page.
This solution works very well and because of automation, it does not matter, if you need the maintenance page on one or on many webservers.
If you are interested, you can find more information regarding "mod_magnet" over here:
http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModMagnet