You don't have to remap URLs in IIS, you can remap them in web.config. For example, you can create an HTTP Handler (.ashx extension) with this code:
public class MyHandler : IHttpHandler
public void ProcessRequest(HttpContext context)
context.Response.ContentType = "text/plain";
public bool IsReusable
You can then remap existing URLs to this new handler in web.config:
<add url="~/SomeUrl.aspx" mappedUrl="~/MyHandler.ashx"/>
So, I would only remap the exceptions to your own HttpHandler and not all extensions which then requires you to try and find out what your code can handle and then give the rest back to the framework.
Alternatively, if you still want to do it from your own handler (not recommended), you can do something like this in ProcessRequest of the IHttpHandler:
string virtualPath = "~/Default.aspx";
string physicalPath = context.Server.MapPath(virtualPath);
IHttpHandler handler = PageParser.GetCompiledPageInstance(virtualPath, physicalPath, context);
Be aware of a few issues though: first: this new ProcessRequest will probably trigger your handler again which will call ProcessRequest which will trigger your handler which will call , well, I think you get the idea. You need to code some stuff to avoid that.
Also, not 100%, but there might be some issues with regard to caching when you execute pages like this. You may want to read up on IHttpHandler and IHttpHandlerFactory if you continue down this path.