A
A
Artyom2019-08-21 11:14:16
htaccess
Artyom, 2019-08-21 11:14:16

How to make a 301 redirect with a label for Yandex.Metrica?

Hello. There is a site with a 301 redirect, but transitions from it to a new site are not tracked in the metric. Tell me how to make it so that there is a label for Yandex.Metrica? Now htaccess looks like this.

RewriteEngine On
RewriteCond %{HTTP_HOST} old.ru
RewriteCond %{REQUEST_URI} !^/yandex_ad1883fab172ff27\.html
RewriteRule (.*) http://new.ru/ [R=301,L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artyom, 2019-08-22
@rozenblit

Yes, there is, everything took off and started ...

RewriteEngine On
RewriteCond %{HTTP_HOST} old.ru
RewriteCond %{REQUEST_URI} !^/yandex_ad1883fab172ff27\.html
RewriteRule (.*) http://new.ru/?utm_source=old.ru[R=301,L,QSA]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question