Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Maintenance / Downtime
  • Hi! New to the forums so I just wanted to say hi first and say that I love FuelPHP :) On topic; I would like to show a page when the site is going through scheduled maintenance or updates and was wondering what would be the best way to handle it. Thanks in advance.
  • I deal with that in my webserver config, using a rewrite rule.
    RewriteCond /my/path/to/fuel/public/maintenance.html -f
    RewriteCond %{REQUEST_URI} !/maintenance.html
    RewriteRule $ /maintenance.html [R=302,L]
    
    So whenever the file "maintaince.html" exists in public, it will be shown. I prefer this to a FuelPHP based solution because it will allow you to do major upgrade works, including upgrading the FuelPHP core and running migrations without some part of the code being needed to run your maintenance code...

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion