I need to fire 301 redirectionfrom example.com... to example.comand example.com////// to example.comHere is my code: RewriteCond %{THE_REQUEST} \ /([^\?\ .]*)\.(?:\?|\ |$)RewriteRule ^ /%1 [L,R=301]It does not work.And here is my .htaccess file:RewriteEngine onRewriteCond %{HTTP_HOST} ^www.example\.com$ [NC]RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^.*/index\.phpRewriteRule ^(.*)index.php$ /$1 [R=301,L]RewriteCond %{THE_REQUEST} \ /([^\?\ .]*)\.(?:\?|\ |$)RewriteRule ^ /%1 [L,R=301]
Redirect URL with multiple trailing dots and trailing slashes using .htaccess
htaccess;redirects;trailing slash