Extendng on my question at Is it possible to write a regular expression that catches a match that others have missed in IIS? I would like to know if I can have the rewrite rules write to a file. For example if the file test.aspx is not found and rather than redirecting the user, it gets logged into a file.
IIS URl Rewrite can load custom providers so it's possible to do this using your own provider. For more information see:
Although it might be easier to trawl the IIS logs for 404 errors or have a customer 404 page to do this for you.