Bug #35096
Subroutes can't use empty uriPattern as fallback
Status: | Closed | Start date: | 2012-03-21 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 0% |
|
Category: | MVC - Routing | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | (any) |
Description
I have several packages, for each package I like to create a routing shortcut.
So that instead of using these urls
test.local/Myverylongpersonalname.Myproject/posts test.local/Myverylongpersonalname.MyprojectTest/images
I can use these
test.local/mm/posts test.local/test/images
I prefer to shorten the routes by adding subroutes to the global Routes.yaml like this:
- name: 'Myverylongpersonalname Myproject' uriPattern: 'mm/<MMSubroutes>' defaults: '@package': 'Myverylongpersonalname.Myproject' subRoutes: MMSubroutes: package: Myverylongpersonalname.Myproject
Now I would expect that I can add uriPattern: '' as a fallback route in the Routes.yaml of Myverylongpersonalname.Myproject, but I get:
The URI pattern "mm/" of route "Myverylongpersonalname Myproject :: fallback" ends with a slash, which is not allowed. You can put the trailing slash in brackets to make it optional.
Well and uriPattern: '(/)' doesn't work either.
Related issues
History
#1 Updated by Bastian Waidelich over 2 years ago
- Status changed from New to Closed
- Assigned To set to Bastian Waidelich
- Affected Flow version changed from Git master to (any)
Closing as duplicate of #31777
Please review https://review.typo3.org/#/c/16671/