S
S
Stepan2019-07-01 15:19:50
MODX
Stepan, 2019-07-01 15:19:50

How to fix 301 redirects on ModX Revo?

Hello!
The site is moving to ModX Revo. The structure changes a bit. A lot of links lead to the old site, mainly from advertising, therefore, in connection with the change in the structure, the question arose of 301 redirects so as not to lose anything.
I tried redirector, autoRedirect - both show an empty page in the admin panel ... I had to do it manually. The .htaccess entry is as follows:
RewriteRule ^izgotovlenie-pechatej-v-novomoskovskom-ao/izgotovlenie-pechatej-v-rumyantsevo/$ izgotovlenie-pechatej-v-rumyantsevo [R=301,NC,L]
This entry works correctly BUT - if you request an old page without a slash at the end - 404.
Hence the question is how to add a redirect correctly so that with a slash, without a slash at the end, other additives after (UTM type) the redirect works correctly.
PS Before and after the .htaccess settings are standard, respectively, the standard page with a slash at the end is transferred to the version without

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2019-07-01
@stevekon

In the RewriteRule template, change /$to /?$

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question