Hi @Abaksoft
I used IIS 10. Install urlrewrite2.exe module for IIS from this url: https://www.iis.net/downloads/microsoft/url-rewrite
Using url rewrite module goto manage server varibles and add two variables: HTTP_X_ORIGINAL_ACCEPT_ENCODING and HTTP_ACCEPT_ENCODING
The following web.config file will do the rest. Please configure this config as per your case.
** I am using mobiletoolkit so there is "/m" in uniGUI urls.
web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RewriteUserFriendlyURL1" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="myapp/myisapi.dll/{R:1}" />
<serverVariables>
<set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
<set name="HTTP_ACCEPT_ENCODING" value="" />
</serverVariables>
</rule>
</rules>
<outboundRules rewriteBeforeCache="true">
<rule name="RestoreAcceptEncoding" preCondition="NeedsRestoringAcceptEncoding">
<match serverVariable="HTTP_ACCEPT_ENCODING" pattern="^(.*)" />
<action type="Rewrite" value="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" />
</rule>
<preConditions>
<preCondition name="NeedsRestoringAcceptEncoding">
<add input="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" pattern=".+" />
</preCondition>
</preConditions>
<rule name="ext-7.0.0" preCondition="NeedsRestoringAcceptEncoding" enabled="true" patternSyntax="Wildcard" stopProcessing="false">
<match filterByTags="A, Link, Script" pattern="/myapp/myisapi.dll/m/ext-7.0.0/*" />
<action type="Rewrite" value="https://mycdn.example.com/ext-7.0.0/{R:1}" />
</rule>
<rule name="uni-1.90.0.1549" preCondition="NeedsRestoringAcceptEncoding" enabled="true" patternSyntax="Wildcard" stopProcessing="false">
<match filterByTags="A, Link, Script" pattern="/myapp/myisapi.dll/m/uni-1.90.0.1549/*" />
<action type="Rewrite" value="https://mycdn.example.com/uni-1.90.0.1549/{R:1}" />
</rule>
<rule name="unim-1.90.0.1549" preCondition="NeedsRestoringAcceptEncoding" enabled="true" patternSyntax="Wildcard" stopProcessing="false">
<match filterByTags="A, Link, Script" pattern="/myapp/myisapi.dll/m/unim-1.90.0.1549/*" />
<action type="Rewrite" value="https://mycdn.example.com/unim-1.90.0.1549/{R:1}" />
</rule>
<rule name="unipackages-7.0.0" preCondition="NeedsRestoringAcceptEncoding" enabled="true" patternSyntax="Wildcard" stopProcessing="false">
<match filterByTags="A, Link, Script" pattern="/myapp/myisapi.dll/m/unipackages-7.0.0/*" />
<action type="Rewrite" value="https://mycdn.example.com/unipackages-7.0.0/{R:1}" />
</rule>
</outboundRules>
</rewrite>
<urlCompression doStaticCompression="true" />
</system.webServer>
</configuration>