Created
May 31, 2022 02:09
-
-
Save foobartel/3cb8e1cd5d8bc103e017ea3e604ddd12 to your computer and use it in GitHub Desktop.
Kirby Route Example - New homepage, other pages to 404
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'routes' => [ | |
[ | |
'home' => 'other-page' | |
'pattern' => ['notes', 'notes/(:any)'], | |
'action' => function() { | |
if (! kirby()->user()) { | |
go('error'); | |
} | |
$this->next(); | |
} | |
] | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment