5

I'm working on a site where I need to add a 'maintenance mode' and became curious to see what methods people use to deploy their sites to live, when there is a required downtime.

Some ideas that come to my mind are symlinked folder switching, .htaccess redirects or even some sort of switch in the application but what do you use and why?

7

I recommend using .htaccess redirect for several reasons:

  1. you can activate/deactivate it by just renaming the file, which is very easy and fast
  2. you can do temporary redirects (302), which is good for seo
  3. you can let several "test/dev" IPs see the real stuff while all other users see the maintenance page (so you can test the new features before going back live)
  4. it's very easy to set this up
2

If you are developing a web application which requires login, you should build this into your administration area which controls parts of the app. Once the app is in Maintenance mode when users attempt to login it redirects or displays a specific message. You can build in further conditions allowing admins or members with specific group ID's access if needed.

Using this method allows you to keep your front end up, and no need to mess with an .htaccess file. If you have multiple developers around the world keeping up with their IP's takes time, plus you can break part of the app while editing the .htaccess file which most likely will contain re-writes and other functions for your app.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.