What is the code to put into .htaccess file in order to make all the people go to the main index page if then stumble upon a 404 Page not found? Is there another way of doing it?
You don't want to do it like that. Setup a custom 404 error page and redirect your visitors to that page.
Yes you make a .htaccess file and 404.php if you dont know how to do this you can see a tutorial here http://www.thesitewizard.com/archive/custom404.shtml
I use this code in my .htaccess ErrorDocument 404 /sitemap.php?id=404 Code (markup): Then on my sitemap page add a few lines of text above the sitemap if its a 404 page. <?php if(isset($_GET['id']) && $_GET['id'] == "404") { print '<h1>Error!</h1>'; print '<p>The page you were looking for was not found on our server.<br />'; print 'Please browse our sitemap below to find what you were looking for.</p>'; } ?> PHP:
rspenc29 has a very good way of doing it, i also use this way but also make it send me an email upon reciving this error.