且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

URL-重写网站中的动态产品和类别

更新时间:2023-11-27 08:09:46

您将需要一些识别特定产品或类别的方法.这就是为什么在URL中最常使用ID的原因,因为ID是唯一的标识符.但是,如果您还有其他信息,这些信息可以提供足够的信息来获取您要查找的特定产品或类别,则可以按照这种方式进行查找.但是,我建议您使用ID来获取产品.有一种原因使之成为访问特定数据记录的常用方法.
You will need to have some way of identifying the specific product or category. That is why it is most common to use the id in the URL since the id is a unique identifier. However, if you have other pieces of information that provide enough information to get the specific product or category that you are looking for, you could do the look up that way. However, I would recommend using the id to get the product. There is a reason why it is the common way of accessing specific data records.