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

.htaccess rules to Harden your website’s Security

Below you see a list of the important rules that you can add to your .htaccess file to harden...

Redirect non-www to www over http and https

Use the following .htaccess code to redirect non-www URLs to www over http and https. Create, or...

Speed up WordPress Leveraging Browser Caching via .htaccess

Insert the following code to your .htaccess file to increase the speed of your WordPress website...

Secure Joomla with .htaccess

Advanced .htaccess rules that will overall secure and increase the speed of your Joomla...

Point your home page URL to a subdirectory

Method 1 - Redirect your main domain to a subfolder on that domain: RewriteEngine On# Change...