I've looked and looked for the answer with no luck! This question is so PHP 101, I'm surprised I never found an answer.
Apache will return allow a web visitor to request:
http://www.fakewebsite.com/directory1/index.html
as
http://www.fakewebsite.com/directory1///////////index.html
if someone requested it that way. The multiple slashes after the first slash are ignored. On a
$theuri = getenv('REQUEST_URI');
type call, however the
http://www.fakewebsite.com/directory1///////////index.html
request would return a value for $theuri of
/directory1///////////index.html
instead of the desired
/directory1/index.html
which is frustrating.
What's the best way to get a return of just one slash per spot in PHP?
Thanks in advance.