Language "home" page redirect does not work after update

Hello again,

the solution worked last week. The EN page was there, and the redirects worked either.

But now the redirects aren’t working anymore. The page is now live, but I don’t change anything in the code!

The goal from the code:

		[
            'pattern' => '(:any)',
            'action'  => function($uid) {
                $page = page($uid);
                if(!$page) $page = page('redirects/' . $uid);
                if(!$page) $page = site()->errorPage();
                return site()->visit($page);
            }
        ],
        [
            'pattern' => 'redirects/(:any)',
            'action'  => function($uid) {
                go($uid);
            }
        ]

is that a link like “/redirect/one-page” goes automatically to “/one-page”, but there only is a 404 error.

Here Routing 101 - Remove part of the URL - #4 by texnixe in this post you recommend the same code, texnixe.

But why does this not work in the newest kirby version? :frowning: