Announcement

Collapse
No announcement yet.

? point my vb3 forum to an underconstruction.html page

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • ? 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 ?

  • #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:
    http://www.shellhacks.com/en/Redirec...e-and-HTAccess
    http://perishablepress.com/htaccess-...-site-updates/

    Comment


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

      Comment


      • #4
        Originally posted by punchbowl View Post
        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...
        X