I have the following script:
function redirect_to($location) {
header("Status: 301");
header("Location: $location");
exit;
}
if($_GET['check'] === '1') {
redirect_to('http://www.domain.com?aaa=bbb');
}
For some reason, it's adding a forward slash to the tail end of the domain name. I also tried echoing a JavaScript windows.location
, same problem.
http://www.domain.com/?aaa=bbb
How can I prevent this?