L
L
lexstile2017-02-21 15:43:38
MODX
lexstile, 2017-02-21 15:43:38

How to make a 301 redirect in MODX?

How to redirect in MODX?
Initial: site.ru/catalog/barriers/kits-barriers-doorhan
Final: site.ru/catalog/barriers
Now adds the [q] parameter.
Url after redirect now:
site.ru/catalog/barriers/?q=catalog/barriers/kits-barriers-doorhan/
Tried:
RewriteRule ^/catalog/barriers/kits-barriers-doorhan/$ catalog/barriers/ [R=301 ,NC,L]
Redirect 301 /catalog/barriers/kits-barriers-doorhan/site.ru/catalog/barriers

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan, 2017-02-21
@lexstile

Hello, this works for me:
The redirect is after

RewriteEngine On
RewriteBase /

but before
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question