ZenphotoCMS Forum
rewriterule for closed site - 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: rewriterule for closed site (/thread-10327.html)



rewriterule for closed site - vincent3569 - 2012-08-24

hi,

can you explain what are supposed to do the folowing lines in .htacess in 1.4.3 :

Redirection for site updates--remove the comment crosshatches from the following rules


"closed.html" in the plugins/site_upgrade folder is the target for the rewrites. You can change


this file to suit your needs.


RewriteRule ^index.php$ plugins/site_upgrade/closed.html [NC,R=302,L]
RewriteRule ^$ plugins/site_upgrade/closed.html [NC,R=302,L]

I wish to modify .htacess to redirect all access of my site to a specific html page during upgrade of my site.




rewriterule for closed site - acrylian - 2012-08-24

That is what these are for. They actually work together with the closed_for_update plugin and then redirect to the html page placed under the path noted (which you of course can change to another place as well). The plugin should change the htaccess. If that doesn't work (as on our own very strict server) you can uncomment them manually.




rewriterule for closed site - sbillard - 2012-08-24

Rather than change the path, just edit the closed.html file that will be in the plugin folder. Make it whatever you want to display.




rewriterule for closed site - vincent3569 - 2012-08-28

hi

thanks for your help. it works fine.
I have a question: only one closed.html file is created? or many files are created to deal with language of the visitors?

I have a suggestion: when you choose to close or open the site, it should be a permanent message which tells the state of the site (opened or closed).
there is a message which indicates the change of the state, but it disapears.




rewriterule for closed site - sbillard - 2012-08-28

There is currently only one such file. I suppose it could be made to be a PHP file so that you could deal with multiple languages. But remember, you do not have Zenphoto present, so you could not make use of it's multi-lingual capabilities.

If you look at the buttons, if the site is open then only the close site button is active. If the site is closed the open site button is active. (Of course, your browser may not show this. What I have found is that browsers that do not show buttons as disabled tend to not show the hover hint of the disabled button.)




rewriterule for closed site - vincent3569 - 2012-08-29

hi

I think it's a little bit confusing.
Rather than have 2 buttons (with only a active one), i will prefer only one button (close or open site) or a specific message which indicates the state of the site (opened or closed).




rewriterule for closed site - sbillard - 2012-08-29

Ok. That change will be in 1.4.4