Backup your site!!!
Create an article with your custom 404 message,, call it something like "my404" if you want
save it and assign it to an unpublished menu call that menu link something like "my404" if you want
Open to edit that menu item you just created and copy the path
it will be somehing like
http://www.your domain .com/index.php?option=com_content&view=article&id=whatever article number my404 has
NOW
go to your error.php file and make a copy of it ((( call it something like error.php_bakup )))
so now you have two files
error.php_backup
error.php
Open error.php and remove everything in it Just below this line: defined( ‘_JEXEC’ ) or die( ‘Restricted access’ );
add the following code:
your code will look like
if (($this->error->code) == ’404′) {
header(‘Location: ‘ . $this->baseurl .’index.php?option=com_content&view=article&id=whatever article number my404 has′);
exit;
}
?>
save the error.php file
upload it to your site
refresh
go to your site and type in some gibberish to see if it works ,, something like: vvvvvv.yoursite.com/lkjsdflkasjdf
you should see your custom 404 page
-------------------------
now, since this is an article link ..like any other.. but being used as your 404 page,, you can assign any module you want.!!
Kewl huh?
If your not happy with this at all,, you have that error.php_backup to restore the original
TMW