index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | lib/http.php | 13 |
diff --git a/lib/http.php b/lib/http.php index 9b63337..0647802 100644 --- a/lib/http.php +++ b/lib/http.php @@ -15,3 +15,16 @@ function throw_http_error($error_number, $error_message, $extra_message = "") { function die_500($message) { throw_http_error(500, "Internal Server Error", $message); }; + +function redirect_temporarily($uri) { + header("Location: " . $uri); + print "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n"; + print "<html><head>\n"; + print "<title>302 Found</title>\n"; + print "</head><body>\n"; + print "<h1>Found</h1>\n"; + print "<p>The document has moved <a href=\"" . $uri . "\">here</a>.</p>\n"; + print "<hr>\n"; + print "</body></html>\n"; + die(); +}; |