Last active
March 7, 2018 13:52
-
-
Save wernersmit/22ca97297a92a3173ae1cdf373d22780 to your computer and use it in GitHub Desktop.
Custom maintenance page with 503 status and html page
This file contains hidden or 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
| # TEMP MAINTENANCE PAGE | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| # maintenance page and assets | |
| RewriteCond %{REQUEST_URI} !/maintenance [NC] | |
| RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC] | |
| # serve default 503 response | |
| RewriteRule .* ./maintenance.html [R=503,L] | |
| # alternate response without custom page | |
| # RewriteRule .* - [R=503,L] | |
| </IfModule> | |
| # serve custom 503 response | |
| ErrorDocument 503 /maintenance.html |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title>Temporarily unavailable</title> | |
| </head> | |
| <body> | |
| <h1>Temporarily unavailable</h1> | |
| <p>Please check back soon.</p> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment