Jump to:

23478 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Site Maintenance?

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

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

Page: 1
Go to End
Author Topic: 1352 Views
  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Site Maintenance? Link to this post

    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?

  • sajok
    Avatar
    Community Member
    82 Posts

    Re: Site Maintenance? Link to this post

    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.

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: Site Maintenance? Link to this post

    Many thanks that is the answer I was expecting

  • bennettpr
    Avatar
    Community Member
    37 Posts

    Re: Site Maintenance? Link to this post

    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?

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: Site Maintenance? Link to this post

    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.

    1352 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.