How to do a 301 redirect to the address with a slash at the end for ocStore?

ocStore - how to do a 301 redirect to the address with a slash at the end?

Need to all the address without the slash at the end perenapravlenii the page with the slash.

My .htaccess :
Options +FollowSymlinks

Options-Indexes

<filesmatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
 Order deny,allow
 Deny from all
</filesmatch>

RewriteEngine On

# Redirect from htttp to https
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !\..+$
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) https://shop.esport.md/$1/ [R=301,L]


Use Seo Pro which is ocStore.
Here are his settings:
83625e7e29d84d82b111948324b45f06.png
July 2nd 19 at 17:38
2 answers
July 2nd 19 at 17:40
Solution
############################################################################
#### Remove duplicate slashes (/) in the URL ####
############################################################################
RewriteCond %{THE_REQUEST} //
RewriteRule .* /$0 [R=301,L]
############################################################################
#### Remove slashes at the end of the URL for static files (contains a dot) ####
############################################################################
RewriteCond %{REQUEST_URI} \..+$
 # If the file contains a dot.
RewriteCond %{REQUEST_FILENAME} !-d
 # And is not a directory.
RewriteCond %{REQUEST_FILENAME} -f
 # Is a file.
RewriteCond %{REQUEST_URI} ^(.+)/$
 # In the end of the URL has a slash.
RewriteRule ^(.+)/$ /$1 [R=301,L]
 # Exclude slash.

############################################################################
#### Add a slash(/), if it is not, and is not a file. ####
############################################################################
RewriteCond %{REQUEST_URI} !(.*)/$
 # If a slash at the end there.
RewriteCond %{REQUEST_FILENAME} !-f
 # Is not a file.
RewriteCond %{REQUEST_URI} !\..+$
 # In the URL there is a point (file).
RewriteRule ^(.*)$ $1/ [L,R=301]
 # Add a trailing slash.
July 2nd 19 at 17:42
Solution
Included with SeoPro, where the end of the CNC, put a slash. Then go to file on the hosting
catalog/controller/common/seo_pro.php
Search for 328 string
$this->response->redirect($seo);
and change it to
$this->response->redirect($seo,301);
Clean caches, updating modifiers

Well, just check the server response. This option works exactly on ocStore 2.1.0.2.1

Find more questions by tags OpenCarthtaccessNginx