There is a .htaccess file

<IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^www\.example\.ru$ [NC] RewriteRule ^(.*)$ https://example.ru/$1 [R=301,L] RewriteCond %{REQUEST_URI} !/$ RewriteCond %{REQUEST_URI} !\. RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L] RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . %1/%2 [R=301,L] RewriteCond %{THE_REQUEST} ^[AZ]{3,9}\ /index\.php\ HTTP/ RewriteRule ^index\.php$ https://example.ru/ [R=301,L] RewriteCond %{THE_REQUEST} ^[AZ]{3,9}\ /index\.html\ HTTP/ RewriteRule ^index\.html$ https://example.ru/ [R=301,L] </IfModule> 

Tell me how you can fix the redirect from the pages with slashes at the end, it should be one, and now there are three consecutive: Example: from https://example.com/page/ to https://example.com/page /

Now, judging by https://bertal.ru, it looks like this: 1. http://www.example.ru/page// 2. https://www.example.ru/page/ 3. https: // example.ru/page/

It is necessary that immediately on the third option. Please, it is very necessary.

    1 answer 1

     <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteRule ^([^.]*[^/])$ https://example.ru/$1/ [R=301,L] RewriteCond %{THE_REQUEST} " /index\.(php|htm)" RewriteRule ^index\.(php|htm) https://example.ru/ [R=301,L] RewriteCond %{HTTPS} !=on [OR] RewriteCond %{THE_REQUEST} ^[^?]+// [OR] RewriteCond %{HTTP_HOST} ^www\. [NC] RewriteRule ^(.*)$ https://example.ru/$1 [R=301,L] </IfModule>