Created
February 23, 2012 03:38
-
-
Save jjulian/1889874 to your computer and use it in GitHub Desktop.
Apache rewrite rules to show a maintenance page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Capistrano-style: if maintenance.html exists, it will be served for any request | |
# other than style and images. Use status code 503 to tell crawlers to come back later. | |
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