Skip to content

Instantly share code, notes, and snippets.

@traviskroberts
Created November 9, 2013 20:10
Show Gist options
  • Save traviskroberts/7389415 to your computer and use it in GitHub Desktop.
Save traviskroberts/7389415 to your computer and use it in GitHub Desktop.
Basic maintenance page.
# Don't forget to turn on the rewrite engine
RewriteEngine on
# Maintenance Redirection (lets images and styles through)
RewriteCond %{REQUEST_URI} !maintenance.html
RewriteCond %{REQUEST_FILENAME} !(styles|images).+$
RewriteRule (.*) /maintenance.html [R,L]
<!doctype html>
<html>
<head>
<title>Site Name</title>
<style type="text/css">
html, body {
background-color: #ccc;
font-family: helvetica, arial, sans-serif;
padding-top: 50px;
}
#container {
background-color: #fff;
margin: 0 auto;
padding: 25px;
text-align: center;
width: 600px;
}
img {
display: block;
margin: 0 auto;
}
</style>
</head>
<body>
<div id="container">
<img src="/images/logo.png">
<h1>Temporarily Down for Maintenance</h1>
<p>We are performing scheduled maintenance. We should be back online shortly.</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment