diff --git a/core/core.php b/core/core.php index 8f83cace..ce1961fb 100755 --- a/core/core.php +++ b/core/core.php @@ -1954,10 +1954,14 @@ class core extends common { } elseif($this->output['content'] === '') { http_response_code(404); - $this->addOutput([ - 'title' => 'Erreur 404', - 'content' => template::speech('Oups ! La page demandée est introuvable...') - ]); + if ($this->getData(['config','page404'])) { + header('Location:' . helper::baseUrl() . $this->getData(['config','page404'])); + } else { + $this->addOutput([ + 'title' => 'Erreur 404', + 'content' => template::speech('Oups ! La page demandée est introuvable...') + ]); + } } // Mise en forme des métas if($this->output['metaTitle'] === '') { diff --git a/core/module/config/config.php b/core/module/config/config.php index 07881941..4a12da33 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -424,6 +424,7 @@ class config extends common { 'config', [ 'homePageId' => $this->getInput('configHomePageId', helper::FILTER_ID, true), + 'page404' => $this->getInput('configPage404', helper::FILTER_ID, true), 'analyticsId' => $this->getInput('configAnalyticsId'), 'autoBackup' => $this->getInput('configAutoBackup', helper::FILTER_BOOLEAN), 'maintenance' => $this->getInput('configMaintenance', helper::FILTER_BOOLEAN), diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index a5d149c4..4611a2d3 100755 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -29,21 +29,7 @@