Skip to content

Instantly share code, notes, and snippets.

@seebz
Last active December 12, 2015 09:39
Show Gist options
  • Select an option

  • Save seebz/4753445 to your computer and use it in GitHub Desktop.

Select an option

Save seebz/4753445 to your computer and use it in GitHub Desktop.
PHP maintenance mode
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]
<?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&eacute;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