Answer the question
In order to leave comments, you need to log in
Why don't redirects work?
There was a site running on ASP. The link structure was as follows:
site.ru/catalog.asp - general page of the catalog
site.ru/catalog.asp?id_main=86&id_sub=1 - section page (there were no pages like site.ru/catalog.asp?id_main=86)
site .ru/prod_view.asp?id=1550 - product page.
Transferred to Bitrix. Now the links are:
site.ru/katalog/ - general page of the catalog
site.ru/katalog/category/subcategory/ - section page
site.ru/katalog/category/subcategory/product/ - product page It is
necessary to make redirects from old addresses to new ones . For the general page I do: Redirect 301 /catalog.asp http://site.ru/katalog/
OK, everything works. Next for sections:
RewriteCond %{QUERY_STRING} id_main=68&id_sub=3
RewriteRule ^catalog.asp http://site.ru/katalog/category/subcategory/? [R=301,L]
RewriteCond %{QUERY_STRING} ^id_main=68&id_sub=3$ [NC]
RewriteRule ^catalog.asp$ http://site.ru/katalog/category/subcategory/? [R=301,L]
RewriteCond %{QUERY_STRING} id=1550
RewriteRule ^prod_view.asp http://site.ru/katalog/category/subcategory/product/? [R=301,L]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question