F
F
FulgerX20072016-11-11 11:28:51
Nginx
FulgerX2007, 2016-11-11 11:28:51

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

ocStore - how to make a 301 redirect to an address with a slash at the end?
It is necessary that all addresses without a slash at the end are redirected to a page with a slash.
My .htaccess :

Options +FollowSymlinks

Options -Indexes

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

RewriteEngine On

# Перенаправление с htttp на 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]

I use Seo Pro which is built into ocStore.
Here are its settings:
83625e7e29d84d82b111948324b45f06.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-02-05
@FulgerX2007

With SeoPro enabled, where the end of the CNC is, put a slash. Next, go to the hosting file
catalog/controller/common/seo_pro.php
Look for line 328
and change to
Clear caches, update modifiers
Well, just in case, check the server response. This option works exactly on ocStore 2.1.0.2.1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question