What is the best (and simplest) way to temporarily have visitors to my vb3 forum be directed to an underconstruction.html page ?
? point my vb3 forum to an underconstruction.html page
Collapse
X
-
Tags: None
-
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.
👍 1 -
-
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 wayComment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment