|
Posted by J2be on 01/11/06 14:00
"Pete" <@> wrote in message
news:43c45e82$0$9303$ba624c82@nntp02.dk.telia.net...
>I would ro remove all characters after "&" in a url so
> http://www.mydomain.com/test.php?id=1&sid=2 is
> redirected to http://www.mydomain.com/test.php?id=1
>
> <?php
> $pos = strpos($_SERVER['REQUEST_URI'], "&");
> $new_url = "http://www.mydomain.com".substr($_SERVER['REQUEST_URI'], 0,
> $pos);
> // print $new_url;
> header("Location: $new_url");
> ?>
>
> But it doesn't work. All requests are redirected to
> http://www.mydomain.com
>
> What is wrong?
>
nothing, maybe in the $_SERVER['REQUEST_URI'] you don't have a &
--
----
Leonardo Armando Iarrusso - J2Be
www: http://www.J2be.com - e-mail: info[at]J2Be.com
Navigation:
[Reply to this message]
|