I'm relatively new to the Zend Framework but have Bootstrapped a routing configuration file and got the URLs /shop/category/:urlslug and /shop/product/:urlslug working fine.
My problem is that despite persuasion the client wants the URL in both case to be just /:urlslug
I had an idea in my head that the following actions might work:
- Route for /:urlslug
- Matches go to a specific Rewrite controller
- The Rewrite controller queries the category table, if found redirects to the category controller. If not it queries the product table, if found redirects to the product controller. If not triggers a 404.
Is there a better 'Zend' way of doing this?
Thanks