note 82936 added to function.header
| From: | cduke420 at gmail dot com | Date: | Fri, 02 May 2008 18:33:31 +0000 |
| Subject: | note 82936 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-139001@lists.php.net to get a copy of this message | ||
If you have Apache, you can setup your ErrorDocument to point
to a php file that instructs search engines to try again in 120 seconds.
This can be helpful when you are doing maintenance on the site.
Then in .htaccess
ErrorDocument 503 /cgi-bin/503.php
ErrorDocument 500 /cgi-bin/503.php
<?php
ob_start();
@header("HTTP/1.1 503 Service Temporarily Unavailable");
@header("Status: 503 Service Temporarily Unavailable");
@header("Retry-After: 120");
@header("Connection: Close");
?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Temporarily Unavailable</title>
</head><body>
<h1>Service Temporarily Unavailable</h1>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
</body></html><?php
$g=ob_get_clean();
echo $g;
exit;
exit();
?>
See:
http://askapache.com/htaccess/503-service-temporarily-unavailable.html
----
Server IP: 64.71.164.2
Probable Submitter: 24.172.164.205
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/82936
Del: integrated -- https://master.php.net/note/delete/82936/integrated
Del: useless -- https://master.php.net/note/delete/82936/useless
Del: bad code -- https://master.php.net/note/delete/82936/bad+code
Del: spam -- https://master.php.net/note/delete/82936/spam
Del: non-english -- https://master.php.net/note/delete/82936/non-english
Del: in docs -- https://master.php.net/note/delete/82936/in+docs
Del: other reasons-- https://master.php.net/note/delete/82936
Reject -- https://master.php.net/note/reject/82936
Search -- https://master.php.net/manage/user-notes.php