Skip to content

Instantly share code, notes, and snippets.

@sheeplogh
Last active December 16, 2015 02:09
Show Gist options
  • Save sheeplogh/5360015 to your computer and use it in GitHub Desktop.
Save sheeplogh/5360015 to your computer and use it in GitHub Desktop.
apache conf for display maintenance page with 503. (for VirtualHost context)
ExpiresActive On
ExpiresDefault A0
Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
ErrorDocument 503 /maintenance/index.html
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/maintenance/.*$
RewriteRule ^.*$ - [R=503,L]
<IfModule mod_headers.c>
Header set Retry-After "Thu, 11 Apr 2013 08:00:00 GMT"
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment