What would be the best practice approach and most desirable HTTP status code for website / application pages that should not be displayed temporarily?
Describe possible alternatives -
- Leave the user in the current URL, but return a different status code and the contents of the “service”? Maybe 503 codes? SO question - The correct status code for redirecting the maintenance page
- Redirect from URL to a specific service page - code 302 or 307?
- Add temporary routing i.e. mod_rewrite, direct request to the temporary maintenance page?
Also, with regard to caching and expiration, would it be better to set the header to the no-cache date or past expiration date if there is an expected time line in the maintenance window?
source
share