I am working through a massive site I inherited that has a mixture of classic ASP, inline ASP.NET and compiled ASP.NET and all of those utilize #INCLUDE
tags in some form. I've been playing with IIS and rewrites/rewrite maps and seem to have found a working solution to get requests to pages to redirect to new versions as I slowly convert this site into a usable solution, however any page that is requested as an #INCLUDE
(as opposed to directly requested by a user) doesn't seem to honor rewrites or rewrite maps. If I visit the included page directly it rewrites as expected, but visiting a page that embeds the URL on an #INCLUDE
does not.
I'm fairly certain I understand why this would happen (it's not being requested directly so rewrites/redirects don't come into play, just processing like a user control), so any recommendations for making this happen? Normally I'd say just fix the files that are utilizing the include to point to the new location, but the site has 4,221 web files scattered in hundreds of folders with over 1MM images mixed in. Searching for strings such as a filename in that mess takes forever so I'm trying to find something at a higher level that would handle this for me.
Thoughts?