我正在尝试使用 Zend Framework 以下列方式设置路由。
- http://localhost
- http://localhost/类别/
- http://localhost/类别/产品
- http://localhost/category/subcategory/product
- http://localhost/category/subcategory/subsubcategory/product
- http://localhost/category/subcategory/subsubcategory/subsubsubcategory/product
- http://localhost/category/subcategory/subsubcategory/subsubsubcategory/subsubsubsubcategory/product
我已经尝试过正常路由,但它只让我到目前为止,它不能正常工作。
resources.router.routes.product.route = ":categoryAlias/:productAlias/*"
resources.router.routes.product.type = "Zend_Controller_Router_Route"
resources.router.routes.product.defaults.controller = index
resources.router.routes.product.defaults.action = 目录
resources.router.routes.category.route = ":categoryAlias/*"
resources.router.routes.category.type = "Zend_Controller_Router_Route"
resources.router.routes.category.defaults.controller = 索引
resources.router.routes.category.defaults.action = 目录
我可以到达:
但这就是我所能做到的。有关如何以更好的方式解决此问题的任何想法或提示?