Error 404 apache htaccess

Question: My website was a collection of static files and the developer had them in tons of different folder names.
Now how do I deal with not losing people directed by search phrases?
I have looked at examples using .htaccess 301 redirect and I do not have days to list them one by one.

Answer: This is a down and dirty approach you can use until the new location has been indexed.

You need to create an .htaccess file and place it in the site root.
in the file just paste in this:
 
 ErrorDocument 404 /error.php

Now create a blank page error.php

Just paste in something like this:

<?php
   header( 'Location: http://domain-name.com/index.php' ) ;
?>

This way whatever page they may have had indexed will redirect back to the site root.

After some period of time just place a fancy image or do whatever you like with the error 404 page.

Filed Under: Uncategorized