Hello everyone,
for some reason my brain refuses to figure out how routes work in Kirby 3.
For example i´ve got a multi-language website with the following url:
mywebsite.de/de/meta/imprint
And i want it to route to a shorter url:
mywebsite.de/de/imprint
This is what i have so far:
'routes' => [
[
'pattern' => '(:any)',
'language' => 'de',
'action' => function ($uid) {
$page = page($uid);
if(!$page) $page = page('meta/' . $uid);
if(!$page) $page = site()->errorPage();
return $page;
}
],
[
'pattern' => 'meta/(:any)',
'language' => 'de',
'action' => function($uid) {
go($uid);
}
]
]
I tried a lot of other configurations but nothing worked so far. Help is much appreciated!Preformatted text