resources.router.routes.view-article.type = "Zend_Controller_Router_Route_Regex"
resources.router.routes.view-article.route = "articles/(?!archive)([a-zA-Z\-]+)/(\d+)(?:/(.*))?"
resources.router.routes.view-article.reverse = "articles/%s/%d/%s"
resources.router.routes.view-article.defaults.module = "articles"
resources.router.routes.view-article.defaults.controller = "view"
resources.router.routes.view-article.defaults.action = "view-article"
resources.router.routes.view-article.map.1 = topicSlug
resources.router.routes.view-article.defaults.topicSlug = topicSlug
resources.router.routes.view-article.map.2 = id
resources.router.routes.view-article.defaults.id = 0
resources.router.routes.view-article.map.3 = articleSlug
resources.router.routes.view-article.defaults.articleSlug = articleSlug
像这样的链接http://example.com/articles/circus/616/4-marta-vse-za-ruletkami
http://example.com/products/category/product_id/product_name
编辑 1
这是默认路由器插件的设置。从我的博客模块中显示articles
,但很容易更新商店。
零件 -http://example.com/
是主机 :) articles/circus/
=> 模块和控制器映射。
resources.router.routes.view-article.map.1 = topicSlug
是一个类别。商店。
616/4-marta-vse-za-ruletkami
身份证和任何蛞蝓。产品描述,例如“iphone-4S-16-gb”
默认值在配置中。
另一个例子/{maps2module}/{maps2topicSlug}/{maps2id}/{maps2articleSlug}