Hi I've got problem with multiple route patterns, to handle different routes by one controller action.
https://www.blabla.com/search/aa/blabla/
https://www.blabla.com/search/aa/blabla/?from=2015-11-12&to=2015-11-16
https://www.blabla.com/search/aa/blabla.php?from=2015-11-12&to=2015-11-16
https://www.blabla.com/search/aa/blabla/2015-11-12/2015-11-16/
https://www.blabla.com/search/aa/blabla/from/2015-11-12/to/2015-11-16/
my routing
$router->add('/search/{a:[a-zA-Z]{2}}/{b:[a-zA-Z0-9_-]+}/:params',
array(
"controller" => "search",
"action" => "index",
'params' => 3
)
);
$router->add('/search/{a:[a-zA-Z]{2}}/{b:[a-zA-Z0-9_-]+}/{from:/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/}/{to:/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/}/:params',
array(
"controller" => "search",
"action" => "index",
'params' => 5
)
);
when I run https://www.blabla.com/search/aa/blabla/
it gives me Action aa was not found on handler search
$this->dispatcher->getParam("from");
not working either