Search code examples
zend-frameworkrouteszend-route

zend route exclude one string


I defined

routes.kategoriler.route               = ":lang/categories/:cat/:name"
routes.kategoriler.defaults.controller = "category"
routes.kategoriler.defaults.action     = "index"


routes.categories.route               = ":lang/:type/:cat/:name"
routes.categories.defaults.controller = "types"
routes.categories.defaults.action     = "index"

type catches "categories" word. I put definitions before and after but no way. Can you offer a solution?


Solution

  • using hint from Regular expression to match a line that doesn't contain a word?

    routes.categories.reqs.type_name        =  "^((?!categories).)*$"
    

    Solved my case