Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/http.php13
1 files changed, 13 insertions, 0 deletions
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();
+};