With Zend Framework Routing (Zend\Mvc\Router\RouteStack), how can I add a module to support user profile pages.
But I’d also like to have it fall through to support other pages/modules from the root directory like /rss or /search/asdf. This is my first guess with no luck…
'Zend\Mvc\Router\RouteStack' => array(
'parameters' => array(
'routes' => array(
'default' => array(
'type' => 'Zend\Mvc\Router\Http\Segment',
'options' => array(
'route' => '/[:username[/:action]]',
'constraints' => array(
'username' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
'controller' => 'Application\Controller\UserController',
'action' => 'index',
),
),
),
URL examples …
Figured it out. Used Zend\Mvc\Router\Http\Regex matching at the very end of the Route tree …