Magento – What information is required in the ID path of a Magento URL Rewrite

urlurl-rewrite

Is it required to use the old URL in ID path? I thought that was just used for personal identification and you can fill in whatever you want?

Best Answer

Id path is just a unique identifier for the url rewrites. It has no actual logic in the redirect itself.
It is useful so you can mark certain rewrites for later use in the code.
For example, the urls generated for product pages have the id path product/{product_id_here}.
This way you can identify the product url rewrite via code.
It is also useful if you add your own module that writes entries to the url_rewrite table. You can later retrieve them via code.
But an url rewrite will work even if the id path does not mean anything.
The only constraint is that it has to be unique per store view.

Related Topic