Remove Double Slashes from URL without Breaking It
Feb 24, 2012 · 1 minute readCategory: php
If you need to clean up a URL and remove any double (or more) slashes that might have crept in, but need to keep the :// bit intact you might like this little function
protected function removeDoubleSlash($in) {
return preg_replace('%([^:])(
Handy :)