$path = \'/home/to//my///site\';
I am trying to remove unnecessary forward slashes / from the path above
/
I am trying to get this
Hello may this will helpful
Write this code in your .Htaccess file and check it..
# Prevent double slashes in URLs, e.g. //Blog and /Home//About RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . %1/%2 [R=301,L]
Hope it will help you!