Mobile app version of vmapp.org
Login or Join
Lengel546

: Force fresh content, not from the browser cache I used the following code in the htaccess to put my site under maintenance and show the visitors maintenance.html. Options +FollowSymlinks RewriteEngine

@Lengel546

Posted in: #Browsers #Htaccess #Optimization

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Lengel546

1 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

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 www.yourdomain.com/

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme