I
I
Ilya2018-12-07 23:25:59
Apache HTTP Server
Ilya, 2018-12-07 23:25:59

How to make a redirect with saving QUERY STRING?

How to make a redirect so that the base url changes, and the line with the parameters is transferred to the new url.
old-link.ru?utm=1&utm=2&utm3
new-link.ru?utm=1&utm=2&utm3
It is necessary that the rule works exactly on a certain base url - old-link.ru, but with any query string. Because I don't know what the query string will be and the link will always look different.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mysterion, 2018-12-08
@Mysterion

RewriteRule ^(.*)$ http://new-link.ru/$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question