IIS上的URL重写和反向代理

IIS上的URL重写和反向代理,iis,url-rewriting,arr,Iis,Url Rewriting,Arr,我不熟悉在IIS 7.5上设置URL重写和反向代理。我有两台服务器。 我安装了url重写和应用程序请求路由缓存的服务器1。在端口8082的服务器1上设置一个站点,在端口8080的服务器2上设置另一个站点(使用DNS名称)。当我从服务器1访问服务器2上的站点时,它不会显示图像和css 我复制并粘贴重写规则。如果我需要修改规则,请告诉我 我的网站结构是 default.aspx重定向到登录文件夹中的登录页面 CSS/js文件位于content\CSS content\js中 &l

我不熟悉在IIS 7.5上设置URL重写和反向代理。我有两台服务器。 我安装了url重写和应用程序请求路由缓存的服务器1。在端口8082的服务器1上设置一个站点,在端口8080的服务器2上设置另一个站点(使用DNS名称)。当我从服务器1访问服务器2上的站点时,它不会显示图像和css

我复制并粘贴重写规则。如果我需要修改规则,请告诉我

我的网站结构是 default.aspx重定向到登录文件夹中的登录页面 CSS/js文件位于content\CSS content\js中


    <rule name="Reverse Proxy to payroll" stopProcessing="true">
        <match url="^payroll/(.*)" />
        <action type="Rewrite" url="http://localhost:8082/{R:1}" />
    </rule>

<rule name="Reverse Proxy to XYZ" stopProcessing="true">
        <match url="^XYZ/(.*)" />
<conditions>
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />  
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />  
            <add input="{URL}" pattern="\.axd$" negate="true" /> 
</conditions> 
        <action type="Rewrite" url="http://test.XYZ.com:8080/{R:1}" />
                <serverVariables>
                    <set name="ORIGINAL_HOST" value="{HTTP_POST}" />
                </serverVariables>
    </rule>
</rules>
<outboundRules>
    <rule name="Add application prefix" preCondition="IsHTML">
        <match filterByTags="A, Form, Frame, IFrame, Img" pattern="^/(.*)" />
        <conditions>
                    <add input="{URL}" pattern="^/(payroll|XYZ)/.*" />
        </conditions>
        <action type="Rewrite" value="/{C:1}/{R:1}" />
    </rule>
            <rule name="Rewrite Location Header" preCondition="IsRedirection">
                <match serverVariable="RESPONSE_Location" pattern="^http://[^/]+/(.*)" />
                <conditions>
                    <add input="{ORIGINAL_HOST}" pattern=".+" />
                    <add input="{URL}" pattern="^/(XYZ)" />
                </conditions>
                <action type="Rewrite" value="http://{ORIGINAL_HOST}/{C:1}/{R:1}" />
            </rule>
     <rule name="Rewrite image URLs in CSS response" preCondition="IsCSS">
        </rule>
    <preConditions>
        <preCondition name="IsHTML">
            <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
        </preCondition>
                <preCondition name="IsRedirection">
                    <add input="{RESPONSE_STATUS}" pattern="3\d\d" />
                </preCondition>
     <preCondition name="IsCSS">
                <add input="{RESPONSE_CONTENT_TYPE}" pattern="text/css" />
            </preCondition>
    </preConditions>
</outboundRules>