How to get rid of slashes in url?

site.com/ddsda//////// to address on site.com/ddsda/

Htaccess content

AddDefaultCharset utf-8 Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC] RewriteRule .* - [f,l] RewriteRule ^(manager|assets)/$ - [L] RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] 

    1 answer 1

    You need to add the following line to the .htaccess file:

     RewriteEngine On RewriteRule ^(.*?)//+(.*)$ $1/$2 [E=REDIR:1,N] 

    A similar topic was discussed here ...