Styling page not found (404) error page

Permalink 1 user found helpful
Hey there,

I would like to replace the standard concrete 404 page not found design to a branded page to match a specific website's design. So I started off by copying the controller and single page from the concrete dir to the main dir, to override the concrete file, as follows:

cp concrete/controllers/page_not_found.php controllers/page_not_found.php
cp concrete/single_pages/page_not_found.php single_pages/page_not_found.php


I then added my header/footer single_pages/page_not_found.php but the standard concrete header and footer are loaded above and below.

So it seems that the single page is just being loaded up as a block. How can I prevent this or load my own header/footer?

As a workaround I have changed the controller function to redirect to the homepage:

<?php 
defined('C5_EXECUTE') or die(_("Access Denied."));
class PageNotFoundController extends Controller {
   public $helpers = array('form');
   public function view() {
           // header("HTTP/1.0 404 Not Found");
           header('Location: /');
   }
}


Many thanks,