I want to configure my Zf2 application in such a way that multiple strings route to the same controller. For example www.mysite.com/this and www.mysite.com/that both route to the same controller and have this and that available to capture with $this->params. How would I accomplish something like this? Would I need 2 separate route declarations?
'directory' => [
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => [
'route' => '/string1 || /string2 || /string3',
'defaults' => [
'controller' => 'Application\Controller\MyController',
'action' => 'index'
],
],
]
As of definition of Literal route create 3 routes: