Since it's IIS, can you simply drop a file in the root of each website? (would probably be easy with a batch file).
This file would be a
web.config file (used in ASP.NET)
The code in the web.config would look like this.
<customErrors mode="On" redirectMode="ResponseRewrite">
<error statusCode="404" redirect="http://localhost/404.htm" />
Then you make another website in IIS that hosts your
404.htm file, and have it executed at
Alternatively you can create a
404.aspx file and wire it up as your 404 error page (instead of the
404.htm). This file would look something like this.
<%@ Page language="c#" %>
<script language="CS" runat="server">
void Page_Load(object sender, System.EventArgs e)
// here were actually telling the browser that the page is 404 and not 200
Response.Status = "404 Not Found";
Response.StatusCode = 404;
<title>404: Whoops, we lost your file.</title>
<div>Oops, the resource you are looking for is unavailable</div>