Upgrade to 3.0.3

This commit is contained in:
Bastian Allgeier
2019-03-05 10:55:03 +01:00
parent 8e3d86a590
commit 418db4b09b
40 changed files with 704 additions and 144 deletions

View File

@@ -148,7 +148,12 @@ return function ($kirby) {
'method' => 'ALL',
'env' => 'site',
'action' => function (string $path) use ($kirby) {
if ($page = $kirby->page($path)) {
// check for content representations or files
$extension = F::extension($path);
// try to redirect prefixed pages
if (empty($extension) === true && $page = $kirby->page($path)) {
$url = $kirby->request()->url([
'query' => null,
'params' => null,
@@ -160,9 +165,9 @@ return function ($kirby) {
->response()
->redirect($page->url());
}
return $kirby->resolve($path, $kirby->defaultLanguage()->code());
}
return $kirby->resolve($path, $kirby->defaultLanguage()->code());
}
];
} else {