17 Feb

How to put Apache web site into the maintenance mode

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.



Leave a Reply

Your email address will not be published. Required fields are marked *