From 05d7dccfc2f9d49a5b631ba62bed01fa89ad8321 Mon Sep 17 00:00:00 2001 From: Achim Ennenbach Date: Tue, 7 Aug 2018 21:47:20 +0200 Subject: [PATCH] fixes #3179 "Redirect to System not found page" didn't work The response code of 404 made the redirect fail. It looks like, that response codes >= 400 are not supported. --- e107_handlers/redirection_class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e107_handlers/redirection_class.php b/e107_handlers/redirection_class.php index 82483a3f1..1f0c80c6a 100644 --- a/e107_handlers/redirection_class.php +++ b/e107_handlers/redirection_class.php @@ -391,7 +391,8 @@ class redirection header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0', true); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT', true); } - if(null === $http_response_code) + // issue #3179 redirect with response code >= 400 doesn't work. Only response codes below 400. + if(null === $http_response_code || $http_response_code >= 400) { header('Location: '.$url, $replace); }