Either in the virtual host configuration file or in .htaccess we can change the defaults to whatever combination of folder and file we desire.
Virtual host configuration example:
<Directory /www/example>
ErrorDocument 401 /errors/authorizationRequired.html
ErrorDocument 403 “Today you can’t come in, try tomorrow”
ErrorDocument 404 /errors/notfound.html
ErrorDocument 500 http://foo.example.com/errors/internalservererror.html
</Directory>
Normally when the user was already browsing the website and gets a error page, he clicks the browser back button. However, if he just got in to the website and the first page he gets its a error page, if he clicks the back button he leaves the website. So changing this 404 example:
<Directory /www/example>
ErrorDocument 401 /errors/authorizationRequired.html
ErrorDocument 403 “Today you can’t come in, try tomorrow”
ErrorDocument 404 /errors/notfound.html
ErrorDocument 500 http://foo.example.com/errors/internalservererror.html
</Directory>
Normally when the user was already browsing the website and gets a error page, he clicks the browser back button. However, if he just got in to the website and the first page he gets its a error page, if he clicks the back button he leaves the website. So changing this 404 example:
<h2>Not Found</h2>
<h3>The requested URL /example.html was not found on this server.</h3>
to:
<h2>The page you are looking for doesn’t seem to exit anymore</h2>
<h3>Please use the search button to try and find the content you are looking for</h3>
< !- - And this play the search form here - - ><div>
</div><div>
will improve the users experience and might just keep them on the website. A simple change!
The Apache manual calls your attention to several bits of relevant and important information regarding this changes, so be sure to read it here.
<h3>The requested URL /example.html was not found on this server.</h3>
to:
<h2>The page you are looking for doesn’t seem to exit anymore</h2>
<h3>Please use the search button to try and find the content you are looking for</h3>
< !- - And this play the search form here - - ><div>
</div><div>
will improve the users experience and might just keep them on the website. A simple change!
The Apache manual calls your attention to several bits of relevant and important information regarding this changes, so be sure to read it here.