RE: [PHP] URL / slash reduction
| From: | Martin Towell | Date: | Mon, 10 Jun 2002 23:33:01 +0000 |
| Subject: | RE: [PHP] URL / slash reduction | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-101474@lists.php.net to get a copy of this message | ||
There's probably a single reg.ex. you could use, but I'm too lazy to figure
that one out.
But try this instead (not tested though)
$str = "http://www.tuned-belgium.com/user/?id=/junni"
$tmp = explode("?", $str);
$tmp[1] = str_replace("/", "", $tmp[1];
$str = implode("?", $tmp);
-----Original Message-----
From: X-power.be [mailto:yla@x-power.be]
Sent: Tuesday, June 11, 2002 9:22 AM
To: php-general@lists.php.net
Subject: [PHP] URL / slash reduction
this url is the one that i want for my users:
http://user.tuned-belgium.be/junni
but go's now to
http://www.tuned-belgium.com/user/?id=/junni
(slash junni)
but must go to
http://www.tuned-belgium.com/user/?id=junni
(without slash)
how can i prevent or filter the slash away?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php