It may seem like this has been asked before, but I have a wrinkle to this question.
I have a Mosso / RackSpace Cloud site that I am trying to redirect inbound PDF requests such as site.com/abc.pdf to a pdf handler page that will serve them up from App_Data via a BinaryWrite.
They have a sample at http://www.wip.rackspacecloud.com/knowledge_center/index.php/How_do_I_rewrite_URLs_from_ASP.NET that shows how to do this, I have tried it and it does not serve files UNLESS the original file exists.
I am being told by Mosso / RackSpace Cloud that file redirection only occurs when the original file exists.
Does the original file need to exist for a rewrite (as shown in the example) to work?
Local testing under IIS Express 7.5 says not. Perhaps Mosso have the pipeline configured odd somehow so that IIS runs first. I think I am being fobbed off.
If this is IIS redirect, it does not check to see if you actually bought the donuts before trying to hand them out to your friends. Same is true with rewriting in code in ASP.NET. And, considering the HTTP "manifesto" it should not care, as there is a concept called a 404. Not sure how the cloud is set up, so there may be some restrictions there that you have to deal with, but it should be easy enough to bozo and smoke test.