index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-06-06 16:13:24 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-06-06 16:13:24 +0200 |
commit | dd342d1d9863834d9aba120b4a78d2ac959e33f7 (patch) | |
tree | d332a0f4ab28af662957f730e6b32882deb8220c | |
parent | ac15e6b8340039ae68d86f02ca1cd2d68dcf42d0 (diff) |
-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(); +}; |