Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Site Maintenance?


Go to End


5 Posts   3420 Views

Avatar
swaiba

Forum Moderator, 1899 Posts

4 November 2010 at 4:15am

Hi,

When you upgrade a website (e.g. the version of silverstripe) do you do something like add an index.php in the root or change the htaccess temporarily to link to a static page indicating you are carrying out maintenance? Is there a simple way to do this with silverstripe?

Avatar
sajok

Community Member, 82 Posts

4 November 2010 at 5:36am

Edited: 04/11/2010 5:38am

I use this code in .htaccess file :

RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteCond %{REMOTE_HOST} !^91\.192\.248\.32   // your ip here
RewriteRule $ /maintenance.html [R=302,L]

I created a maintenance.html in the root folder, and put in my ip in the code above. Now all visitors are redirected to the maintenance page, and only me can access to the website.

Avatar
swaiba

Forum Moderator, 1899 Posts

4 November 2010 at 5:44am

Many thanks that is the answer I was expecting :)

Avatar
bennettpr

Community Member, 37 Posts

24 February 2011 at 8:58am

I've used a similar tactic and it works well, but is a little clunkier to set up than I'd like.

There's also the Holding Page module: http://www.silverstripe.org/holding-page-module/

Does anyone know if this module is suitable to be used while the SilverStripe core is being upgraded?

Avatar
Willr

Forum Moderator, 5523 Posts

24 February 2011 at 8:24pm

You shouldn't really upgrade the core on the live site. I also think relying on a module may not work as if core breaks then it'll bring all SilverStripe specific code down with it. You are best using your own maintanence.html file and .htaccess rule (as shown above) than a module.