I am using a combination of .htaccess
redirect and HTML meta
refresh to put in a temporary splash page while restoring my web site from a backup.
Here's the index.html
:
<!DOCTYPE html>
<html>
<head>
<title>Site Restore</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="refresh" content="15">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?3.5.1/build/cssreset/cssreset-min.css&3.5.1/build/cssfonts/cssfonts-min.css&3.5.1/build/cssbase/cssbase-min.css">
<style type="text/css">
html {
background-color: #ccc;
}
div {
margin: 1em auto;
border: 1px solid #000;
border-radius: 0.5em;
padding: 1em;
width: 480px;
background-color: #fff;
}
</style>
</head>
<body>
<div>
<h1>Site Restore</h1>
<p>This web site is being restored from a back-up, and will be back online shortly.</p>
<p>If you leave this page open, it will redirect when the site restore is complete.</p>
</div>
</body>
</html>
.htaccess
Redirect:
RewriteEngine On
RewriteBase /
RewriteRule ^.+$ / [R=302,NC,L]
After the backup restore is complete, I remove the RewriteRule ^.+$ / [R=302,NC,L]
line from .htaccess
and delete the index.html
file. Even though index.html
is not in the URL, I get this error back from the web server:
Forbidden
You don't have permission to access /index.html on this server. Apache/2.2 Server at dev.swissmangocms.com Port 80
If I manually refresh the browser window, index.php
is loaded as I would expect. How do I avoid the error message and manual step?