enigma1 - 8:24 pm on Dec 15, 2011 (gmt 0)
The proper way is on a shared server, when you override the error page, the server should not output a specific response header.
You don't know what each site wants to do for an error how it's going to handle it and the programming language used. For PHP it implements a header override option with recent versions. ASP has an AddHeader method that behaves differently.
The AddHeader method adds a new HTML header and value to the response sent to the client. It does not replace an existing header of the same name. After a header has been added, it cannot be removed.
So if the server outputs 404 always including a custom page, your code may not be able to alter it.