wet-boew/wet-boew-php

Maintenance Mode...

crochefort opened this issue · 2 comments

Is this something that you think people would like to have?

This would be for V4.

Just thinking of reusing the main page template but remove the link to home page. And Re-route all the page to that page. How I don't know yet!

Maybe @michael-milette would love to have something like that for his website.

Hi @crochefort,

We did some maintenance on a local copy of the site today. I was surprised to see that all it said was the site name followed by:

"The site is undergoing maintenance and is currently not available" (yes, in English only)

It doesn't happen often but it looks like we could definitely could use an official bilingual Maintenance server page template.

As for re-routing all your pages...

In order to accommodate different CMS's, it should be possible to enable the page using a variable or use it as a standalone page should someone decide to enable it using htaccess.

A few things to consider when implementing a maintenance page:

  1. It would have to be done very early on in the code because the page must send out a 503 Service Unavailable response code (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) or you could end up negatively affecting your SEO should a search engine happen to try indexing your site while it is in maintenance mode.
  2. Make sure that you don't also block the maintenance page itself or you'll have an endless loop on your hands.
  3. Don't block images if you plan on using them in your maintenance mode page. The same might go for CSS and JS files if you use them.
  4. Don't block yourself out or you may not be able to access the site to do the maintenance. Some techniques to bypass this could include having a setting to specify a local IP address that is not affected by the maintenance state. The maintenance system should also be smart enough to never block access to the site from the site's server itself. Some other options might include using a special parameter in the URL which could set a cookie eliminating the need for it once used.
  5. For best results, also send an "always set Retry-After" in the header to let search engines know when it should be safe to come back. One day (86400 seconds) should be a good value here. Even better, make it a variable that site admins can set for themselves.

Thanks for thinking of me. Let me know if you have any questions.

Best regards,

Michael Milette

Seem's little late to think about that I think ... too bad!