Skip to content

Instantly share code, notes, and snippets.

@rgo
Created July 28, 2009 10:54
Show Gist options
  • Save rgo/157111 to your computer and use it in GitHub Desktop.
Save rgo/157111 to your computer and use it in GitHub Desktop.
503 for maintenance pages
# Show maintenance page if it exists
ErrorDocument 503 /system/maintenance.html
RewriteEngine On
RewriteCond %{REQUEST_URI} !\.(css|gif|jpg|png)$
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ - [redirect=503,last]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment