TIP: override default "DANG" error message

Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2138
Posted: Sat, 2009-10-24 19:46

In Kohana kohana_error_page.php and kohana_error_disabled.php are used to manage what is displayed in case of the error. In case of G3 today we are only interested in first one.

Second could be used in production environment, but there are configuration settings which are not set.

So lets concentrate on the first one.
Copy existing copy from /modules/gallery/views/ into themes/.../views and customize as you want it to look like.
Or if you want to use standard 404 handling via .htaccess then replace file content as following:

Quote:
<?php defined('SYSPATH') OR die('No direct access allowed.');

if ( ! headers_sent())
{
// Send a 404header
header('HTTP/1.1 404 Not Found');
}
?>

Note: In response to https://sourceforge.net/apps/trac/gallery/ticket/603