I've devised a way to handle this, although it's not the most elegant solution. In my case I had to handle requests for *.cfm files, since the old site ran on ColdFusion. The problem was that Umbraco wasn't handling these requests and thus it wasn't using the 404-page that I configured in Umbraco.
A code snippet in the global.asax file does the trick, however. Here's the entire global.asax file:
404-handling of static (non-.NET) files in Umbraco?
Has anyone figured out yet how to get Umbraco to handle "Not Found" for static (e.g. .html) files?
IIS: 7.5
.NET: 4.0, integrated pipeline
Umbraco: 6.x.x
I've devised a way to handle this, although it's not the most elegant solution. In my case I had to handle requests for *.cfm files, since the old site ran on ColdFusion. The problem was that Umbraco wasn't handling these requests and thus it wasn't using the 404-page that I configured in Umbraco.
A code snippet in the global.asax file does the trick, however. Here's the entire global.asax file:
---------------------------------------------------------------
<%@ Application Codebehind="Global.asax.cs" Inherits="Umbraco.Web.UmbracoApplication" Language="C#" %>
<script runat="server">
protected void Application_BeginRequest(object sender, EventArgs e)
{
if(HttpContext.Current.Request.CurrentExecutionFilePathExtension == ".cfm")
{
Context.RewritePath("~/non-existing-URL-here-so-Umbraco-will-handle-the-404/");
}
}
</script>
---------------------------------------------------------------
is working on a reply...