This content has been marked as final. Show 3 replies
I use Application.cfm to check my database settings.
So you have a cfquery tag retrieve the settings, check if maintenance is 1, If so, you can do one of two things
1 is redirect using cflocation to maintenance.cfm and exit processing the file.
2 is to include maintenance.cfm and have maintenance.cfm exit processing the file
The cool thing about this code here is the use of a debug mode cookie. If the cookie is set with the secret key, then that person can still view the website. You have a form in the back end that sets up the cookie with the same key. So when you are ready for maintenance, you can shut down the website, enable the machine you are using to have debug mode enabled and debug any changes without them being visible to the public.
This even works when you are not in maintenance.
Say you are working on a new section of code, you can put it into a separate file (in case of syntax errors) and then only include the file if the debug mode is enabled.
Great if you are changing an entire section such as your header, or main template even, but you still want everyone else to see the old one until you are finished.
Thanks guys. I will check these ideas out!