Answer the question
In order to leave comments, you need to log in
The page does not redirect to a new one. How to solve?
I am transferring the site from the subcategory to public_html. From the old site there are links of this type site.ru/catalog.php?id=1
, it is necessary that they look like this site.ru/id=1.
I tried this
RewriteRule ^catalog.php$ site.ru/id=1 [L,R=301]
As a result I got the following link /id=1?_route_=catalog.php
Redirect 301 https://site.ru/catalog.php ?id=1 site.ru/id=1 - no results.
Please tell me how to solve
Answer the question
In order to leave comments, you need to log in
RewriteCond %{QUERY_STRING} (?:^|&)(id=\d+)
RewriteRule ^catalog\.php$ http://site.ru/%1? [L,R=301]
RewriteCond %{QUERY_STRING} (^|&)id\=(d+)($|&)
RewriteRule ^catalog\.php$ /id=%2? [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question