S
S
Sergey Goryachev2021-04-19 17:46:23
Apache HTTP Server
Sergey Goryachev, 2021-04-19 17:46:23

How to make such .htaccess redirect?

There is a link like - site.ru/?1NMJKI, where 1 is the event identifier, and NMJKI is the unique number of the visitor.
You need to make a redirect from this link to site.ru/?course=1&utm_source=sms&utm_term=NMJKI

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2021-04-19
@dodo512

At the beginning of .htaccess add

RewriteCond %{QUERY_STRING} ^(\d+)([A-Z]+)$
RewriteRule ^$ /?course=%1&utm_source=sms&utm_term=%2 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question