Created
June 6, 2019 06:34
-
-
Save anushshukla/a15a64b3f4cc7f2b5f4a3bf8f335435d to your computer and use it in GitHub Desktop.
PHP file to display Maintenance WebPage during downtime for maintenance of the website applicatoin
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
| <?php | |
| http_response_code(503); | |
| if(isset($_SERVER['HTTP_X_REQUESTED_WITH'])) : | |
| echo json_encode("Website is under maintenance"); | |
| endif; | |
| ?> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> | |
| </head> | |
| <body> | |
| <article> | |
| <h1>We’ll be back soon!</h1> | |
| <div> | |
| <p>Sorry for the inconvenience but we’re performing some maintenance at the moment. If you need to, you can always <a href="mailto:support@website.com">contact us</a>, otherwise we’ll be back online shortly!</p> | |
| <p>— Team</p> | |
| </div> | |
| </article> | |
| </body> | |
| </html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment