Skip to content

Apache Maintenance Mode

perrygeo edited this page Dec 3, 2012 · 1 revision
  <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond  /usr/local/apps/bioregion-discovery/MAINTENANCE_MODE -f
    #RewriteCond %{REMOTE_ADDR} !^your.IP.address.here$
    RewriteRule ^(.+) /usr/local/apps/bioregion-discovery/media/down.html [L]
  </IfModule>

Then just create your media/down.html file and touch MAINTENANCE_MODE will bring up the site notification.

I prefer this way to django-maintenance-mode as this allows you to take down the application server or database and still have a functioning maintenance page.