From 28ac6a7b5554554681157770f21b5242ce0ca995 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 21 Feb 2022 19:46:11 +0100 Subject: [PATCH] NEW on redirect of page in website module, GET parameters are kept. --- htdocs/core/lib/website.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index ca907ae6f1c..ea40cb2dd7e 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -467,7 +467,7 @@ function redirectToContainer($containerref, $containeraliasalt = '', $containeri if ($permanent) { header("Status: 301 Moved Permanently", false, 301); } - header("Location: ".$newurl); + header("Location: ".$newurl.(empty($_SERVER["QUERY_STRING"]) ? '' : '?'.$_SERVER["QUERY_STRING"])); exit; } else { print "Error, page contains a redirect to the alias page '".$containerref."' that does not exists in web site (".$website->id." / ".$website->ref.")";