Forum Moderators: phranque
ErrorDocument 404 http ://www.mysite.com For pages that do not exist, show your 404 error page with a direct HTTP 404 status code. On that page link to the root page and to the main sections of your sites.
For specific non-existent URL requests, you could set up a 301 redirect pointing to a content page with similar or related content to the ones that no longer exist. It is bad form to redirect such URL requests to the root of a site.
# Declare proper error pages for 404-Not-Found and 410-Gone
ErrorDocument 404 /local-path-to-proper-404-error-page.html
ErrorDocument 410 /local-path-to-proper-410-error-page.html
#
# Doctor-assisted duplicate-content suicide (and inefficient, as well)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.(html?|php[0-9]{0,2$)} http://www.example.com/? [R=301,L]