under maintenance

Author Message

Pascal Specht

Tuesday 12 August 2008 3:14:24 am

This is maybe not 100% an eZ Publish issue, but I'd like to know if some of you came up with an easy to use mechanism to put a site offline for some time with some 'under maintenance' kind of screen.

I know this can be done manually by hacking the .htaccess file or overriding the index.php, but I'm looking ofr a better solution where customers coming through a bookmark to any of the pages would also get the maintenance screen.
How did you deal with this issue?

Thanks for your input,
</Pascal>

Steven E. Bailey

Tuesday 12 August 2008 9:14:50 am

What we do is redirect the apache "Access Denied" page to our own internal page with a maintenance page and then block access to all but our own ip. These are the relevant lines in our virtual host file:

# --construction, uncomment this:
# ErrorDocument 403 http://ezpublish/construction/index.html
<Directory /var/www/ezpublish>
Options FollowSymLinks -Indexes ExecCGI
AllowOverride None
# --construction, uncomment this:
# Order deny,allow
# Deny from all
# Allow from 10.0.0.1
# --live, uncomment this:
Order allow,deny
Allow from all
</Directory>

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Damien Pobel

Tuesday 12 August 2008 12:56:55 pm

Hi Pascal,

I use a rewrite rule in .htaccess file :

RewriteEngine on
RewriteRule  (.*) /path/to/your/maintenance/file/index.htm [L]

I give some details on my blog : http://pwet.fr/blog/putting_a_site_under_maintenance

Cheers

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Pascal Specht

Wednesday 13 August 2008 12:29:40 am

Hi Damien, hi Steven,

Thanks for your suggestions. I think I'm going to put something together some day with an easy-to-use checkbox in the admin interface, and will post it as an extension on the contribution area.

</Pascal>

Domenico Garozzo

Monday 10 May 2010 8:55:42 am

Hi,

for put your site under manteinance you can create a index.html file with your custom message.

Then open .htaccess immediatly after the line

RewriteEngine On

Add this line

RewriteRule \.(gif|jpg|png|css|js)$ - [L]
RewriteCond %{REQUEST_URI} !^.*/plain_site.*$
RewriteCond %{REQUEST_URI} !^.*/plain_site_admin.*
$RewriteRule (.*) index.html [L]

Obviously plain_site and plain_site_admin are standard site access that you replace with your siteaccess.

Sorry for my english and i hope if this can help you.

Rawflow

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.