|
Posted by Pete on 01/11/06 03:12
So I've made a script that just look for "&" in the url and removes all
characters after that. So http://mydomain.com/test.php?id=1&sid=2 is
redirected to http://mydomain.com/test.php?id=1
<?php
$pos = strpos($_SERVER['REQUEST_URI'], "&");
$new_url = "http://mydomain.com".substr($_SERVER['REQUEST_URI'], 0, $pos);
// print $new_url;
header("Location: $new_url");
?>
But it doesn't work. "print $new_url" outputs the correct url, but all
requests are redirected to http://www.mydomain.com
What is wrong?
Navigation:
[Reply to this message]
|