User Tools

Site Tools


404

This is an old revision of the document!


Custom 404 Page

The standard content file for the error 404 page is created and saved in “/data/other/404.xml”.

To customize it create a new page called 404. It will override the standard version.

The code is in index.php

# define page, spit out 404 if it doesn't exist
$file = GSDATAPAGESPATH . $id .'.xml';
$file_404 = GSDATAOTHERPATH . '404.xml';
$user_created_404 = GSDATAPAGESPATH . '404.xml';
if (! file_exists($file)) {
	if (file_exists($user_created_404)) {
		//user created their own 404 page, which overrides the default 404 message
		$file = $user_created_404;
	} elseif (file_exists($file_404))	{
		$file = $file_404;
	}
	exec_action('error-404');
}
404.1331578330.txt.gz · Last modified: 2013/04/19 14:53 (external edit)