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.
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)
Comments
`# 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)