404 error means “ page not found “. Basically this occurs when you make a mistake spelling page name in a site while typing or reference by google search, of if the page is deleted or moved.
Add fallowing entry in .htaccess file for page redirection.
Make sure to create .htaccess file within the website source root directory and add fallowing entry
ErrorDocument 404 /testing.html
Save and exit .
Modify apache configuration file to enable page redirection using symbolic link Allow All
Add below lines in httpd.conf file; specify website source files location as indicated below.
Options Indexes FollowSymLinks MultiViews
allow from all
After modify httpd.conf file make sure to reload apache service in order changes take effect.
#service httpd reload
After reloading apache service, visit the url with unknown keyword as indicated below.
Above URL should take you to testing.html as specified in .htaccess file.
How redirecting 404 error with .htaccess, page redirection 404 error , how to redirect page using .htaccess file, An error page redirect using .htaccess ,