Is it possible to intercept all and any relative paths used in an application and remove/edit a portion of it before the absolute path is evaluated?
Example:
In mvc view page-
<%= Html.Image("~/{somefolder}/logo.png") %>
I want to intercept the relative path "~/{somefolder}/logo.png" and replace "{somefolder}" with a folder location retrieved through some logic (database, if/else etc.)