I'm trying to use the header function to redirect to another page. The source and the destination are both locations on my locally configured Apache virtual host.
The following code works:
header("Location: http://my.local.host/directory/file.php");
The following code gives a 404 error:
header("Location: http://my.local.host/directory/file.php?var=x");
Does this have anything to do with the way my virtual server is handling URIs? Is there some other way to construct headers that allows explicit post values? Is there another way to redirect and/or pass values besides using header()?