Header redirect error message received: 404 Not Found error

Hello,

the PHP redirect code you see below is throwing a error message:

Moved Temporarily
The server encountered an internal error or misconfiguration and was unable to complete your request.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

header ("Location: /system/status_display.php?msg=$msg");
exit(); 

if i take out the url variables it works.

header ("Location: /system/status_display.php");
exit(); 

I need a way to send the url variable with the redirect, looking for a work round this error message?

What are the contents of $msg? What ever is in there might be giving you a problem.

Instead of sending the message in the query you could store them in a session.

There are also two syntax changes you could try, but I’m a stickler with not using double quotes unless absolutely need:

Use curly brackets:

header ("Location: /system/status_display.php?msg={$msg}");
exit();

Use concatenation:

header ('Location: /system/status_display.php?msg=' . $msg);
exit();

Let me know what is in that string, and if any of this helps.

Thanks!