Route_Action - Redirect with query string (v2023)

Hi All,

I have the following redirect into Route_Action

$app->redirect("/Player","/player", "302") ;

Redirect works fine.

But the original request had some GET parameters which are not getting passed.

i.e. ?id=12345&more=112233

I tried a workaround saving the _GET to a _SESSION variable but it doesn’t seem to create the session variable. (Haven’t looked at why yet)

Does anyone know if the parameters can be passed as a part of the redirect. Have found conflicting posts on google regarding.

TIA
Steve.

You need to append the query string yourself, you may want to use PHP’s $_SERVER['QUERY_STRING'].

1 Like

Thanks for the reply. That’s the path I ended up going down. :+1: