Put images on CDN, using MVC3 on IIS7

后端 未结 2 627
南笙
南笙 2021-02-03 12:47

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

2条回答
  •  被撕碎了的回忆
    2021-02-03 13:23

    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.

提交回复
热议问题