Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used the following code in the htaccess to put my site under maintenance and show the visitors maintenance.html.

 Options +FollowSymlinks
 RewriteEngine on
 RewriteCond %{REQUEST_URI} !/maintenance.html$
 RewriteRule $ /maintenance.html [R=302,L]

My site is now back online but now I see that all those browsers that tried to go on my site during the maintenance, they are still getting the maintenance.html.

It works if I clear the browser cache and I sort of understand why it is happening. I think the browser caches the redirect and is still doing it.

How can I clear this issue?

share|improve this question
up vote 1 down vote accepted

You should force your users back to the main site - you can use a meta refresh redirect or a htaccess redirect.

You can use this in the Maintenance html - includes a delay of 3 seconds, you could add to the page - the site is back online you are being redirected to the main site.

<meta http-equiv="refresh" content="3;URL='http://www.yourdomain.com/'">

Htaccess Method

Redirect 301 /maintenance.html http://www.yourdomain.com/
share|improve this answer
Thanks, I will try that – Manish Pradhan Jan 11 '13 at 15:31
If the original .htaccess redirect for maintenance is cached, won't this cause some sort of infinite loop? – BadHorsie Dec 21 '15 at 18:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.