I have a cataloge with over 1000 products that have old links such as
example.com/catalog/?Singleproduct=1
example.com/catalog/?Singleproduct=2
example.com/catalog/...
and new pretty links after changing:
example.com/catalog/tulip
example.com/catalog/lilia
ID of a product and slug we can get from database. We can get the ID of a current product (on it's page) by this command
echo $Product->Item_ID;
and a slug
echo $Product->Item_Slug;
I have 2 questions: 1) Is it better just to close old links from indexation (if some of them are in Google search already) or to make a rewrite rule for old links? 2) How to do that right (in .htaccess or in php... where is more useful)?
It wouldn't be so hard if it should be redirect to 1 page, but there are a lot of IDs and different redirects to different slugs.