Closed rafaeldotjs closed 7 years ago
Hello, I have the following piece of code, which doesn't match something I thought it should:
$router->respond('GET', '/[a:Language]/[**:pagePath]?', function ($request,$respond,$service) { $_SESSION['Language'] = $request->Language; $service->pagePath = $request->pagePath; });
It matches /en/contact But doesn't match /en/
Shouldn't it match /en/ as well, since after the [**:pagePath] condition there is a '?' that means it's optional?
Thank you, if I need to provide more info, I will.
Moved the project to a framework, like most people do.
Hello, I have the following piece of code, which doesn't match something I thought it should:
It matches /en/contact But doesn't match /en/
Shouldn't it match /en/ as well, since after the [**:pagePath] condition there is a '?' that means it's optional?
Thank you, if I need to provide more info, I will.