look in your /system/application/errors/ and find the error_404.php and put this (edited to match your site of course)

<?php
header(“HTTP/1.1 404 Not Found”);
header(“location:http://www.tldomain.com/index.php?/controller/sitemap/404″);
?>

So when the 404 page loads the 404 still gets logged by apache etc… but once that happens it gets rushed of to (in this case) the site map. The 404 variable tells the controller method in this case the site map to display a this page cannot be found message.