Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can someone explain how to change a site to return a 503 HTTP header?


Put Redirect 503 in your Apache configuration file.


I wrote this up awhile ago for how to do this in pure httpd configuration:

http://journal.paul.querna.org/articles/2009/08/24/downtime-...


You can do it on a page-by-page basis. If your server supports PHP, add <? header('HTTP/1.1 503 Service Unavailable'); ?> before all other bytes in the file that you want to 503.


Which HTTP server are you using? Apache? nginx? Each one is different.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: