H
H
Hosting Yaroslavl2018-01-17 10:40:33
htaccess
Hosting Yaroslavl, 2018-01-17 10:40:33

How to remove the ymclid get parameter via .htaccess added by Yandex Market?

When you go to the site from the market does not find the page. I guess because of adding ?ymclid=*** at the end.
https://market.yandex.ru/product/1840001118?show-u...
How to remove this parameter without touching the rest via .htaccess

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2018-01-17
@yarhosting

RewriteCond %{QUERY_STRING} (^|&)show-uid=160964544213342035117011($|&)
RewriteCond %{QUERY_STRING} (^|&)nid=57280($|&)
RewriteCond %{QUERY_STRING} (^|&)fesh=440498($|&)
RewriteCond %{QUERY_STRING} (^|&)context=search($|&)
RewriteRule ^product/1840001118$ /product/1840001118? [L,R=301]

Here I showed you how you can extract each get separately, plus how to remove them altogether. (in the direction where to pay attention to the question at the end, it is he who removes all get parameters)
Neither if you need to remove one, then all you need is to collect the regular expression
. Variables from cond are not $1$2 and so on, but %1%2 and so further
In your case, you need to redirect only one parameter, just work with it, leave the rest of the url unchanged.
And in the where line, do not forget to put the screen in front of the question, because this is a special character after all.
By the way, in the geth, mine is also screened.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question