Answer the question
In order to leave comments, you need to log in
How to make redirects by UTM tag in .htaccess?
I'm trying to glue duplicates, by UTM tag. Please help
If there is ?SECTION_CODE=..., then make a redirect, but leave everything that comes after the symbol &
?SECTION_CODE=... & ...
Doesn't want to work like that, error 500
RewriteRule ^catalog/([a- zA-Z0-9\-_])/?SECTION_CODE=([a-zA-Z0-9\-_])&(.*)$ /catalog/$1/?$3
The generator produces such a solution. I really don't want to fuss too much
Answer the question
In order to leave comments, you need to log in
RewriteCond &%{QUERY_STRING} ^(.*?)&SECTION_CODE=[^&]*(.*)
RewriteCond %1%2 ^&*(.*)
RewriteRule ^catalog/.+/$ /$0?%1 [R=301,L]
GET - is not part of the url and it does not get into the rewrite rule at all
https://www.generateit.net/mod-rewrite/index.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question