ZenphotoCMS Forum
how to close gallery when upgrading ? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: how to close gallery when upgrading ? (/thread-6709.html)



how to close gallery when upgrading ? - hucste - 2010-03-04

as the title say : how to close gallery when the admin upgrad this ? (for not permit visit ...)




how to close gallery when upgrading ? - kagutsuchi - 2010-03-04

You could either set a gallery password while upgrading or change the index page to indicate that an update is in progress.




how to close gallery when upgrading ? - sbillard - 2010-03-04

Best is to add an index.html page for during the upgrade as while the upgrade is in progress zenphoto may not function well enought to handle the password protection.




how to close gallery when upgrading ? - hucste - 2010-03-04

thks all.




how to close gallery when upgrading ? - wongm - 2010-03-05

I have added the following lines at the top of my .htaccess file, just below the "RewriteBase /" directive:

`# For maintenance

RewriteCond %{REQUEST_URI} !/maintenance.html$


RewriteCond %{REQUEST_URI} !/images(.*)$


RewriteCond %{REQUEST_URI} !(.*).jpg$


RewriteCond %{QUERY_STRING} !(.).jpg(.)$


RewriteCond %{REMOTE_HOST} !^1.2.3.4


RewriteRule $ /maintenance.html [L] `


This bit of code redirects all users to the page 'maintenance.html' that is located in the root directory.

When I want to do maintenance I uncomment (remove the '#' symbol) from every line but the first one. Replace 1.2.3.4 with your current IP address so that you can still access the web pages normally.

There are some extra line in there that stop .jpg images being redirected (I use my gallery to host images directly linked elsewhere, and I want them to keep on working)