(Sorry if I have tagged this to the wrong component -- not sure if it should be in admin module or base system)
I was doing quite a few major changes to my site recently, and realised that it would be a good idea to take the site offline while I was at work ... but there was no simple way of doing it. Mambo has this feature, and I would find it very useful in Drupal.
When I posted the idea in the forum (see http://drupal.org/node/15751#comment-26045), it was suggested that I could achieve this affect by editing my .htaccess file, and restoring the original once I wanted the site on-line again.
Howver, hacking .htaccess seems a bit crude, and it's not really the sort of solution I was hoping for. I would not want non-technical administrators to even think of trying it, and I don't like generating 404 errors or simply redirecting everything to the home page -- it would look like the site was broken.
It would be nice if there was some simple way of disabling all access for particular categories of user. A login page would obviously still have to be available (at http://www.mysite.dom?q=user/login ), but otherwise users would be presented with a simple message saying "this site is temporarily off-line for maintenance. Please try again later"
Tweaks could allow for customisable off-line messages, and ideally for an optional time-constraint on the "offline" mode -- in case the admin forgets to turn it back on again.
Comments
Comment #1
chrisada commentedIsn't permission settings enouch? If you disable 'access content' for all user roles, the site is pretty much sealed. Then in admin/setting you can set a custom page to show for '403 access denied', and say whatever you want there.
Comment #2
clairem commentedThanks chrisada
That sounded like it's part way towards what I'm looking for. But when I tried it out (see below) it turns out to be way too complicated, and doesn't achieve all I wanted.
Here are the steps I took:
node/xxin the settings page, and saveI this point I wanted to test it ... but just in case I'd screwed something up, I didn't want to log out in case I couldn't get back in again. So I fired up another browser, and went to take a look.
The results were not very encouraging:
So this doesn't really do what I want.
I'd like a "take site offline" function which had all that functionality available on one dedicated page on the admin menu, without having to burrow around more generalised pages.
Having it spread over several pages makes it more likely that users would would forget to turn something back on properly. Since those pages have other settings on them too, there's a risk of making an error and altering another setting.
This seems to me to be something that's a sufficiently important function to justify grouping it all together. And it would be particularly nice to have the ability to enable this function for selected user categories on admin/user/configure/permission
Comment #3
kbahey commentedPerhaps a scheme that combines the use of the front_page module (http://drupal.org/node/13367) and a custom 404 page that points to front_page?
To elaborate, if the front_page module is configured with a a non-themed customer page (which just has HTML saying 'our web site is under maintenance, and will be back in 2 hours'.
Hmm. That would not work still. Requests to valid nodes will still get the nodes, not the web site down message.
OK, another idea: if there is a flag parameter that bootstrap can check for, and if set it goes to a configurable node path, that would do the trick. Care should be taken to allow the admin to login still (otherwise one would lock himself out).
Any other ideas?
Comment #4
kbahey commentedThis is now a 4.7 feature.