This is how you can add put you webisite working under Apache web server into the maintenance mode. Note that you need to have mod_rewrite enabled.
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
RewriteCond %{REQUEST_FILENAME} !/maintenance.html
RewriteRule ^.*$ /maintenance.html [L]
If the page maintenance.html exists all requests will be rewritten to it.