How can I route "/img/" to the "/Content/img" folder in ASP.NET MVC 3? -
i want urls images in asp.net mvc application of form:
www.mydomain.com/img/someimagename.png
however, have images in mvc project in the: /content/img/ folder.
how can write route map /img /content/img?
images don't pass through asp.net stack. iis handles requests. need write httpmodule if want asp.net application handle image requests. blog shows how this: http://weblogs.asp.net/jgaylord/archive/2009/05/04/letting-asp-net-handle-image-file-extensions-in-iis-6.aspx
but easier solution create virtual directory in iis.
Comments
Post a Comment