I received an answer and have for the most part made the solution work. I needed to use URL Rewriting in IIS, and in doing so make both inbound and outbound rules for the rewrite.
This works perfect EXCEPT when I have a CSS property with a value URL being relative in the themes.css and other places. For example:
Code: Select all
.rule{
background-image: url(/images/picture.jpg);
}
Code: Select all
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="java/(.*)" />
<action type="Rewrite" url="http://s17857763.onlinehome-server.com:8080/{R:1}" />
</rule>
</rules>
<outboundRules>
<rule name="RewriteRelative" preCondition="IsHtml" enabled="false" stopProcessing="true">
<match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="/(.*)" />
<action type="Rewrite" value="/java/{R:1}" />
</rule>
<rule name="RewriteAbsolute" preCondition="IsHtml" enabled="false">
<match filterByTags="A, Area, Base, Form, Head, IFrame, Img, Input, Link, Script" pattern="http(s)?://s17857763\.com/(.*)" />
<action type="Rewrite" value="/java/{R:2}" />
</rule>
<preConditions>
<preCondition name="IsHtml">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
<add input="{URL}" pattern=".*/java/.*" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
Because of the outbound rules it loads the normal CSS and JS links fine because they come from HTML tags (\<link\> and \<script\>....but i dont know if it's possible to fix the CSS url( ) path
i also posted this question on stackoverflow in case you want to answer there also so that reddit isn't the only community that sees the answer