From dd342d1d9863834d9aba120b4a78d2ac959e33f7 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 6 Jun 2019 16:13:24 +0200 Subject: lib/http.php: redirect_temporarily($uri) new --- lib/http.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib') 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 "\n"; + print "\n"; + print "302 Found\n"; + print "\n"; + print "

Found

\n"; + print "

The document has moved here.

\n"; + print "
\n"; + print "\n"; + die(); +}; -- cgit v1.2.3