Add redirection to home page in case of HTTP error
This commit is contained in:
parent
4a66255fcc
commit
8e4f3dc3f0
2 changed files with 11 additions and 0 deletions
10
site/controllers/error.php
Normal file
10
site/controllers/error.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
return function ($site) {
|
||||
|
||||
// Get home page object
|
||||
$homePage = $site->homePage();
|
||||
|
||||
// Redirect to home page
|
||||
return go($homePage->url());
|
||||
};
|
1
site/templates/error.twig
Normal file
1
site/templates/error.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends "base.twig" %}
|
Loading…
Add table
Add a link
Reference in a new issue