I am using the following htaccess rul to remove double or more slashes from web urls:
#remove double/more slashes in url
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
This is working fine for slashes occured in the middle of uris, such as, If use url:
http://demo.codesamplez.com/html5//audio
Its being redirected to proper single slahs url:
http://demo.codesamplez.com/html5/audio
But if the url contains double slashes in the beginning, JUST AFTER the domain name, then there its not working, example:
http://demo.codesamplez.com//html5/audio
its not being redirected.
How I can fix the above rule to work for this type of urls as well? Thanks.