What would the best practice approach and most desirable HTTP status code be for website / application pages that should not be displayed temporarily?
To outline possible alternatives -
- Leave user at the current URL, but return a different status code and 'maintenance' content? Possibly 503 code? SO question - http://stackoverflow.com/questions/1701584/proper-status-code-for-a-maintenance-page-redirect
- Redirect from URL to a specific 'maintenance' page - 302 or 307 code?
- Add temporary routing, i.e. mod_rewrite, direct request to temporary maintenance page?
Also, regarding caching and expiry, would it be best to set a no-cache or past expiry date header, vs. a retry-after, if the maintenance window has an expected time-line?