I am trying to change the displayed URL with a reg exp. The goal is for a URL like this:
to be displayed like this, with or without the last "/"
I am very new to reg exp and this is what i have so far.
ereg("([^\\/]*)$", $pathOrUrl, $regs);
echo $regs[0];
but that just displays the index.php?a=...
How can i get the first part of the url?
Thanks for any help
---------------------------------------
to be displayed like this, with or without the last "/"
I am very new to reg exp and this is what i have so far.
ereg("([^\\/]*)$", $pathOrUrl, $regs);
echo $regs[0];
but that just displays the index.php?a=...
How can i get the first part of the url?
Thanks for any help
---------------------------------------