ErrorDocument 404 /search.html If you maintain a popular or complex website, no matter how careful you are, you will receive a number of requests for invalid URLs or documents that no longer exist. Though many of them can be addressed with proper use of Redirects, there will always be a number of requests that end up with the dreaded 404 Document Not Found response. For that reason, it may be desirable to replace the default Apache error page and direct your users to a special location in your website. For example, a page that can help your visitors find the resource they were looking for, such as a search page or site map, as shown in the example. On a related note, Chapter 6 provides additional information on customizing access denied pages. |