I tested this case with this:
<? php
if (isset ($ _ GET ['foo'])) {
echo '<pre>';
print_r ($ _ GET);
echo '</pre>';
exit ();
}
$ fp = 'http: //server/header.php? foo = bar & var = abc';
header ("Location:". $ fp);
exit ();
?>
I am calling the address: http: //server/header.php and the redirection works fine with http: //server/header.php? foo = bar & var = abc 'and _GET completed:
Array
(
[foo] => bar
[var] => abc
) Note:
- capitalized first letter.
- colon and space after "Location"
- full link
- call exit ().
On the other hand, make sure that nothing is displayed in the browser BEFORE TRANSFERRING.
source share