how to close gallery when upgrading ?

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

Comments

  • You could either set a gallery password while upgrading or change the index page to indicate that an update is in progress.
  • 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.
  • thks all.
  • wongm Member
    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)
Sign In or Register to comment.