Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 7 down vote accepted

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
share|improve this answer
    
Did some research on this option and found a very useful site for various .htaccess maintenance setups: askapache.com/seo/503-service-temporarily-unavailable.html –  Nat Ryall Jun 7 '12 at 14:49
    
Did the answer and your link solve the problem? –  Michael Jun 19 '12 at 11:06
    
It did, and the .htaccess method works beautifully. Thanks! –  Nat Ryall Jun 20 '12 at 11:18

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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