Handle 404, 500, and 301 Apache Errors With .htaccess file

If A 404 Error happen in your web site it will show a not available page with no links. You can escape from this situation very easly. The solution is surprisingly simple. Use your .htaccess file simply put a line ErrorDocument 404 /index.php in the file. The error redirected to your home page. Problem solved.