Skip to content

How to create a 404 redirect page in Joomla

Copy the error.php file from your-site/templates/system to your template main directory.

Then just open the error.php file from your Joomla template and edit it.

If you want to redirect to a sitemap on your site  for example use this code at the top of the error.php file before everything in the file write:


defined( '_JEXEC' ) or die( 'Restricted access' );
if (($this->error->code) == '404') {


Published inCoding