Answer the question
In order to leave comments, you need to log in
How to redirect such pages?
Hello. I broke my head how to redirect such pages:
https://site.ru/?page_id=430 https://site.ru/proekty/olimpiada-uchiteley-matematiki/
https://site.ru/?page_id=710 https: //site.ru/proekty/podderzhka-matematikov-ic...
If I set it like that, it immediately redirects to the main page. But if there is only one page, then everything works out
RewriteEngine on
RewriteCond %{QUERY_STRING} ^page_id\=430$
RewriteRule ^$ https://site.ru/proekty/olimpiada-uchiteley-matematiki/? [R=301,L]
RewriteCond %{QUERY_STRING} ^page_id\=710$
RewriteRule ^$ https://site.ru/proekty/podderzhka-matematikov-i-chlenov-ih-semey/? [R=301,L]
Answer the question
In order to leave comments, you need to log in
hold friend
RewriteCond %{QUERY_STRING} (?:^|&)page_id\=430(?:$|&)
RewriteRule ^$ /proekty/olimpiada\-uchiteley\-matematiki/? [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question