I have tried to solve the issue of not getting css and images files loaded in browser after url rewriting in IIS for classic asp app. I have found the solution which shows in developer tool's network tab that files are loaded (Status Code: 200 OK) and css and image urls are now pointing to correct folders - but file contents don't just get loaded. Here is the web.config based on the solution (How to fix URL Rewriting for links inside CSS files with IIS7):
<rule name="Rewrite css URLs" preCondition="IsCSS" stopProcessing="true">
<match pattern="localhost/asp-app/data/styles" />
<action type="Rewrite" value="localhost/asp-app/styles" />
</rule>
<preConditions>
<preCondition name="IsCSS">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="text/css" />
</preCondition>
</preConditions>
</outboundRules>
<rules>
<rule name="Rewrite-to-http-verbs-handler">
<match url=".*" />
<action type="Rewrite" url="/asp-app/routes/router2.asp" />
</rule>
</rules>
</rewrite>
And even though I use absolute url in the css-link tag in the head section
<link rel="stylesheet" href="http://localhost/asp-app/styles/test.css">,
the css don't not get loaded. And the same is with images, even full urls are not working, ie.
<img src="http://localhost/asp-app/images/konsultaatio.jpg" />
Any ideas how to fix?