Redirect all 404 errors to the homepage

If you want to redirect all 404 errors to the homapge or any other page, You can do the following

Open up your (default template) system/error.php using your favorite editor like dreamweaver or notepad++ , then after this php code:

defined( '_JEXEC' ) or die( 'Restricted access' );
?>

copy and paste this php code.

<?php
header("Location: http://mydomain.com");
exit;
?>