Last active
December 12, 2015 09:39
-
-
Save seebz/4753445 to your computer and use it in GitHub Desktop.
PHP maintenance mode
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
| RewriteEngine On | |
| #RewriteBase / | |
| # On autorise l'accès à notre adresse IP | |
| #RewriteCond %{REMOTE_HOST} !^123\.123\.123\.123 | |
| # On évite de boucler | |
| RewriteCond %{REQUEST_URI} !^/503\.php | |
| RewriteRule .* 503.php [L] |
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 | |
| header('HTTP/1.1 503 Service Temporarily Unavailable'); | |
| header('Status: 503 Service Temporarily Unavailable'); | |
| header('Retry-After: 3600'); | |
| ?> | |
| <html> | |
| <head> | |
| <title>Site en maintenance</title> | |
| <style type="text/css"> | |
| <!-- | |
| body { font:small sans-serif; } | |
| --> | |
| </style> | |
| </head> | |
| <body> | |
| <h1>Site en maintenance!</h1> | |
| <p>Nous effectuons actuellement une maintenance du site.</p> | |
| <p>Merci de réessayer dans quelques instants.</p> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment