[Documentation] How to put Vanilla 2 to offline mode?
Hi folks,
I wonder how can I switch vanilla forum to offline. I can't find any docs about this operation, please help.
Best Answers
-
x00 MVP
I don't really get what you asking. But here is a top tip
Create your sorry.php
<?php header('HTTP/1.1 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable'); header('Retry-After: '.(3600*5));//5 hours ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex"> <title>Sorry for inconvenience</title> </head> <body class="ReadMe"> <p>We are very sorry for the inconvenience,service has been temporarily suspended for maintenance. </p> <p>This is to make site.com better. If you wish to contact the admin send an email to admin@site.com</p> </body> </html>
in your .htaccess
RewriteCond %{QUERY_STRING} !cheat RewriteCond %{HTTP_COOKIE} !cheat=1 RewriteRule .* sorry.php [L] RewriteCond %{QUERY_STRING} cheat RewriteRule .* - [R,L,co=cheat:1:.%{http_host}:7200:/]
To work on it while it is down add
?cheat=1
to the end of the url once. This will create a a cheat cookie.503 is the correct status code for search engines. When you finished simply comment out those lines in the .htaccess. Bob's your uncle.
grep is your friend.
1 -
x00 MVP
the flaw with that argument is if the software isn't functioning it can't be used to handle maintenance necessarily.
That is why an external solution is better.
If they granted every suggestion like this vanilla would be totally bloated. It wouldn't be vanilla it would be tuti fruti
grep is your friend.
2
Answers
@est
There is this plugin:
http://vanillaforums.org/addon/maintenance-plugin
I don't use it myself, but it seems that it might do what you are looking for, or at least point the way forwards.
@whu606, thanks for having time to help!
Vanilla comes with maintenance mode template out of the box. From these considerations I think there must be some core feature for this. Do you know something about it?
I don't really get what you asking. But here is a top tip
Create your sorry.php
in your .htaccess
To work on it while it is down add
?cheat=1
to the end of the url once. This will create a a cheat cookie.503 is the correct status code for search engines. When you finished simply comment out those lines in the .htaccess. Bob's your uncle.
grep is your friend.
@x00
Thanks for the suggestion. I thougt about .htaccess rewrite rule and this is really plain and simple way.
A'm asking about core page that is shown at
/dashboard/home/updatemode
(in my 2.0.18.4 these pages are listed at/dashboard/routes
). As long as this page is provided I suggest that there might be checkbox or button like "Put site to maintanence mode" or something like that.the flaw with that argument is if the software isn't functioning it can't be used to handle maintenance necessarily.
That is why an external solution is better.
If they granted every suggestion like this vanilla would be totally bloated. It wouldn't be vanilla it would be tuti fruti
grep is your friend.