-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Router rule: (:alphanum) doesn't work #498
Comments
i think the 'alphanum' key must be define before 'alpha' key. can you try swap 'alphanum' and 'num' keys in system/Router/RouterCollection class $placeholders property |
It works with that change. Anyway I needed alphanumdash so I defined my own rule :). |
There is another "error" which has connection with that above... you can't create for example new rule which contain at the beginning key from $placeholders. |
Good catch with the ordering of default placeholders. |
Docs: (:alphanum) will match any string of alphabetic characters or integers, or any combination of the two.
Routing:
$routes->add('/objects/(:alphanum)/(:num)', 'Admin::objectsList/$1/$2');
URL:
https://adm.domain.com/objects/users/10 - DOESN'T WORK
Routing:
$routes->add('/objects/(:alpha)/(:num)', 'Admin::objectsList/$1/$2');
URL:
https://adm.domain.com/objects/users/10 - WORKS
The text was updated successfully, but these errors were encountered: