How to Remove Multiple Slashes from URL

You can use this .htaccess rule for removing multiple trailing slashes anywhere in URL:

Example:
http://yourdomain.com/page/1//// will be redirected to http://yourdomain.com/page/1/

Add the following code to your /public_html/.htaccess

RewriteEngine On
RewriteBase /
Options +FollowSymlinks

RewriteCond %{REQUEST_URI} //+
RewriteRule ^(.*) $1 [R=301,L]

Was this answer helpful?

Also Read

Do you support mod_rewrite for apache?

Yes, mod_rewrite is enabled on your server. For more information on what mod_rewrite is and how...

.htaccess URL Masking Examples

If you would like to access a specific URL for your domain but do not display it in the browser's...

GET/POST Security with .htaccess

Below is a useful code to block out some common exploits for GET/POST values with .htaccessSimply...

Leverage Browser Caching using .htaccess

Add the following .htaccess rules to the very end of your .htaccess file to reduce the load times...

Block visitors by IP address using .htaccess

Deny access based upon IP address, or an IP block, by placing the following code into your...