? point my vb3 forum to an underconstruction.html page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Greg Wilson
    New Member
    • Jun 2010
    • 22
    • 2.2.1

    ? point my vb3 forum to an underconstruction.html page

    What is the best (and simplest) way to temporarily have visitors to my vb3 forum be directed to an underconstruction.html page ?
  • punchbowl
    Senior Member
    • Nov 2006
    • 3903
    • 4.0.x

    #2
    Put a htaccess in your site root with something like this in it:

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC]
    RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif|css|js) [NC]
    RewriteRule .* /maintenance.html [R=302,L]
    </IfModule>

    Explained:
    LIne 1: comment
    Line 2 : activate rewriting
    Line 3: don't rewrite if the file is called maintenance.html
    Line 4: don't rewrite if the file is an image/css/javascript (You can probably omit this line)
    Line 5: rewrite everything else to go to maintenance.html

    Couple of links:

    Redirect visitors to a maintenance page during site updates. We're using htaccess, so you can just chill. Quick copy and paste code for you.


    Comment

    • donald1234
      Senior Member
      • Oct 2011
      • 1953
      • 4.1.x

      #3
      The simplest way would be to use an index.html file. It will go there by default.

      Comment

      • Paul M
        Former Lead Developer
        vB.Com & vB.Org
        • Sep 2004
        • 9886

        #4
        Originally posted by punchbowl
        Explained:
        LIne 1: comment
        Line 2 : activate rewriting
        Line 3: don't rewrite if the file is called maintenance.html
        Line 4: don't rewrite if the file is an image/css/javascript (You can probably omit this line)
        Line 5: rewrite everything else to go to maintenance.html
        JFYI, Line 1 isnt a comment, its a check on whether the module is installed (and needs line 6 as well).
        Baby, I was born this way

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...