I need to use CDN for all images on my site. So, Ive decided to use IIS Url-rewriting module, because edit manually all my site views - its impossible for me.
So Ive ma
Given that the original URLs are coming from your content and not, for example, from bookmarks, I think you'll have trouble avoiding a request to your site and a redirect; a potentially significant performance impact that could negate the benefits of using a CDN.
It would be better if your could apply URL rewriting to the HTML that is transmitted to the browser, rather than when a request comes in.
Trouble is, I don't know how (unless you're using ISA server, in which case I could tell you, but I suspect you're not)!
You could create a custom ActionFilter and override OnResultExecuted, but you'd need to annotate your controller with the filter attribute.