Hello,
I'm having the following problem:
I want to expose CMSAdminControls folder as CMSUIControl.
I am trying to use IIS7 URL Rewrite Module and I have defined the following inbound and outbound rules:
<rewrite>
<rules>
<rule name="Inbound CMSUIControls" stopProcessing="true">
<match url="CMSUIControls/(.*)" />
<action type="Rewrite" url="CMSAdminControls/{R:1}" logRewrittenUrl="true" />
</rule>
<rule name="Inbound CMSUIControls QueryString" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{REQUEST_URI}" pattern="(.*)CMSUIControls(.*)" />
</conditions>
<action type="Rewrite" url="{C:1}CMSAdminControls{C:2}" appendQueryString="false" />
</rule>
</rules>
<outboundRules>
<rule name="Outbound CMSUIControls" preCondition="IsHTML" enabled="true">
<match filterByTags="Img, Link, Script" pattern="(.*)CMSAdminControls(.*)" />
<conditions trackAllCaptures="true">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</conditions>
<action type="Rewrite" value="{R:1}CMSUIControls{R:2}" />
</rule>
<preConditions>
<preCondition name="IsHTML">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
The inbound rules are working ok but when I enable the outbound rule the URL Rewrite Module crashes on each request with 500 URL Rewrite Module error. I have enabled tracing and it returns the following error description "Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded ("deflate"). "
However the compression is disabled at server level.
Am I missing something? Is there another better way to do this?