If you need to make ‘https://domain.com/////////////’ links like this ‘https://domain.com/’, you can copy the following solution to .htaccess. In this case, the redirect will be instant (not multistep).
RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} !="" RewriteCond %{THE_REQUEST} ^[A-Z]+\s//+(.*)\sHTTP/[0-9.]+$ [OR] RewriteCond %{THE_REQUEST} ^[A-Z]+\s(.*/)/+\sHTTP/[0-9.]+$ RewriteRule .* https://%{HTTP_HOST}/%1 [R=301,L] RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . %1/%2 [R=301,L]