doubi1713 2015-09-28 10:06
浏览 31

多个重定向的产品会链接到多个漂亮的网址

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.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 划分vlan后不通了
    • ¥15 GDI处理通道视频时总是带有白色锯齿
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)
    • ¥15 自适应 AR 模型 参数估计Matlab程序
    • ¥100 角动量包络面如何用MATLAB绘制
    • ¥15 merge函数占用内存过大
    • ¥15 使用EMD去噪处理RML2016数据集时候的原理
    • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大