Recent Topics

1 Dec 28, 2010 23:50    

My b2evolution Version: 4

Can someone tell me how to make a static HTML page that loads whenever someone goes to my URL while still allowing me to build the site behind it. In other words, when someone goes to wccoa.org I want them to see http://wccoa.org/index.html while I continue to build out the rest of the page here http://wccoa.org/index.php/Home/. How do I do this?

2 Dec 29, 2010 00:24

you dont have to do anything.by default browsers check for index.html first. Just upload your under construction page and name it index.html. it wont redirect to idnex.php.

other than that, there has to be a setting in b2 under conf/advanced.php, that allows only admins to access the site.

5 Dec 29, 2010 01:01

That seems to work, although it would be nice if I could make it a bit "prettier" using an HTML page of my choosing...not the end of the world though. Thanks!

6 Dec 29, 2010 01:16

In b2evo 4 all you need is rename/create a file maintenance.html in /conf/ directory, and style it the way you like.

7 Dec 29, 2010 20:42

Ok, the other issue though, is that if it's in maintenance mode it won't let me load any of the page (backend or frontend) - it simply pulls up the maintenance page even if I go to a different page (ex: http://wccoa.org/index.php/Home/) Is there a way to make it so only going to the base url (http://wccoa.org) redirects to the maintenance page but I can still work on the site "behind" that?

8 Dec 30, 2010 08:57

a workaround;
add below lines in your skins ...header.inc.php


if( !is_logged_in() || ( $current_User->ID !=1) ) header('Location: http://www.myblog.com/index.html');

this will redirect everyone except logged in admin

9 Dec 30, 2010 09:41

.htaccess

# DEFAULT DOCUMENT TO DISPLAY:
# this will select the default blog template to be displayed
# if the URL is just .../blogs/
<IfModule mod_dir.c>
	DirectoryIndex index.html
</IfModule>

Upload index.html holding page
Call up yourdomain.tld/index.php to bypass the htaccess

¥


Form is loading...