You need to make a redirect from the pages http://www.mysite.ru/news/?PAGEN_1=1 and http://www.mysite.ru/news/?&PAGEN_1=1 to the page http://www.mysite.ru/ news / , and from all pages with URLs ending in? & PAGEN_1 = n for the same URL, only ending in? PAGEN_1 = n. Similarly for the section / articles / 2 /
redirects in htaccess
RewriteCond %{QUERY_STRING} ^PAGEN_1=1 [NC] RewriteRule ^news/$ http:/www.mysite.ru/news/$ [R=301,L] RewriteCond %{QUERY_STRING} ^&PAGEN_1=1 [NC] RewriteRule ^news/$ http:/www.mysite.ru/news/$ [R=301,L] RewriteCond %{QUERY_STRING} ^&PAGEN_1=([2-9]*)$ [NC] RewriteRule ^news/(.*)$ http:/www.mysite.ru/news/?PAGEN_1=%1 [R=301,L] RewriteCond %{QUERY_STRING} ^PAGEN_1=1 [NC] RewriteRule ^articles/2/$ http:/www.mysite.ru/articles/2/$ [R=301,L] RewriteCond %{QUERY_STRING} ^&PAGEN_1=1 [NC] RewriteRule ^articles/2/$ http:/www.mysite.ru/articles/2/$ [R=301,L] RewriteCond %{QUERY_STRING} ^&PAGEN_1=([2-9]*)$ [NC] RewriteRule ^articles/2/(.*)$ http:/www.mysite.ru/articles/2/?PAGEN_1=%1 [R=301,L] For the news section, everything works as it should, but from the pages http://www.mysite.ru/articles/2/?PAGEN_1=1 and http://www.mysite.ru/articles/2/?&PAGEN_1=1 throws out to the http://www.mysite.ru/articles/ section (there is such a section on the site too). I can not understand why, and how to write a redirect?