title: IIS URL rewrite trouble with CSS url() values
body: <p>A week or so ago I asked a question regarding running 2 different app/web servers on a VPS, but using one main incoming URL/port (using only site.com and not needing site.com:8080). </p>
  
  <p>I received an answer and have for the most part made the solution work. I needed to use URL Rewriting, and in doing so make both inbound and outbound rules for the rewrite.</p>
  
  <p>This works perfect EXCEPT when I have a CSS property with a value URL being relative. For example: </p>
  
  <pre><code>.rule{
      background-image: url(/images/picture.jpg);
  }
  </code></pre>
  
  <p>My current inbound and outbound rules are as follows</p>
  
  <pre><code>&lt;rewrite&gt;
          &lt;rules&gt;
              &lt;rule name="ReverseProxyInboundRule1" stopProcessing="true"&gt;
                  &lt;match url="java/(.*)" /&gt;
                  &lt;action type="Rewrite" url="http://s17857763.onlinehome-server.com:8080/{R:1}" /&gt;
              &lt;/rule&gt;
          &lt;/rules&gt;
          &lt;outboundRules&gt;
              &lt;rule name="RewriteRelative" preCondition="IsHtml" enabled="false" stopProcessing="true"&gt;
                  &lt;match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="/(.*)" /&gt;
                  &lt;action type="Rewrite" value="/java/{R:1}" /&gt;
              &lt;/rule&gt;
              &lt;rule name="RewriteAbsolute" preCondition="IsHtml" enabled="false"&gt;
                  &lt;match filterByTags="A, Area, Base, Form, Head, IFrame, Img, Input, Link, Script" pattern="http(s)?://s17857763\.com/(.*)" /&gt;
                  &lt;action type="Rewrite" value="/java/{R:2}" /&gt;
              &lt;/rule&gt;
              &lt;preConditions&gt;
                  &lt;preCondition name="IsHtml"&gt;
                      &lt;add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /&gt;
                      &lt;add input="{URL}" pattern=".*/java/.*" /&gt;
                  &lt;/preCondition&gt;
              &lt;/preConditions&gt;
          &lt;/outboundRules&gt;
      &lt;/rewrite&gt;
  </code></pre>
  
  <p>If you would like to see the issue i'm having, with your dev console open, go to <a href="http://s17857763.onlinehome-server.com/java/FirstMaven/" rel="nofollow">http://s17857763.onlinehome-server.com/java/FirstMaven/</a></p>
  
  <p>Because of the outbound rules it loads the normal CSS and JS links fine because they come from HTML tags....but i dont know if it's possible to fix the CSS url( ) path.</p>