I have a file xyz.html in a sub-directory of my www folder, I want to this file to link to a 404 page not found file in the www root folder, when it needs to!
How do i implement this?
Do you mean that you want to serve the xyz.html file as a custom 404 page?
This will differ depending on the web server, but it's likely to be Apache. This guide shows how to setup a custom 404 page using htaccess files
Do you mean linking or redirecting? If it's the redirecting, here's a simple redirecting page which is independent on the type of server you site is hosted on.
The code if placed in
/subfolder/xyz.html, will redirect the user to
/404.html using 3 methods.
3. Display a link for user to click
You can change "/404.html" to any other url (relative or absolute) for other redirecting purposes as well, regradless of the server the site is hosted on.