Level 75
You can do something like in this article.
Hi all,
Just wondering if there's a more succinct way of handling my current situation.
So we are in the process of redeveloping a large e-commerce website from procedural. So the routing is currently as follows: www.website.com/category-slug www.website.com/product-slug
Both currently share a verryyyy long procedural file to lookup and work out whether it's a category that should be displayed or a product. Ultimately, I really can't change the link structure across the site (that would obviously be the best way) to something like www.website.com/product/product-slug.
Just wondering how people might get around this whilst keeping code decoupled.
Tia
Please or to participate in this conversation.