Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

In this Discussion

[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

  • x00x00 Don't PM about development, I'm not currently taking on clients MVP
    Answer ✓

    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.

    UnderDog
  • x00x00 Don't PM about development, I'm not currently taking on clients MVP
    Answer ✓

    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

    UnderDogest

Answers

Sign In or Register to comment.