views:

29

answers:

3

I am trying to set up a Zend Controller Route to Route to ALL of the Following URLs:

Is this possible with Zend Framework?

In particular I am having trouble routing to:

The router seems to be getting confused and routes to Controller->1Action

A: 

You have to have three different routes IMO. And they all need to be "regex" - so that the strings and numbers are not mixed up.

Tomáš Fejfar
A: 

Routes are checked in reverse order. So place first the controller/id/action route and then afterwards the controller/id and controller/action.

Furthermore, use regex in your routes to distinguish an id and action. Because they appears the same for the router. When you explicitly says the id is 0-9 and action is a-zA-Z this can be fixed.

Jurian Sluiman