(from github.com/zaryk)
I have ARR setup in IIS under an web application with a virtual directory called “FTS”. This way, all traffic for Fess should go through FTS. E.g. Selecting a filesystem index from the list, gets redirected to to https://test.site.gov/admin. This should start with https://test.site.gov/fts/admin. I can manually modify the url to go to the expected path.
Do you have any thoughts on this or suggestions?
The below configuration is what I am using.
-
Rewrite CSS/JS/Images/Links to include a base address
-
Change logout urls to append /fts to beginning. This is because logout would redirect to https://test.site.gov/logout
-
Change login urls to append /fts to beginning. This is because logout would redirect to https://test.site.gov/login
-
Change admin urls to append /fts to beginning. This because on login it would redirect to https://test.site.gov/admin
-
Reverse proxy from localhost:8080 to new address
EDIT:-------------------
Updated with data-href for admin. Requires UrlRewrite 2.1
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<outboundRules>
<clear />
<rule name="ChangeAdmin">
<match serverVariable="RESPONSE_LOCATION" pattern="/admin(.*)" />
<action type="Rewrite" value="/fts{R:0}" />
</rule>
<rule name="ChangeLogout">
<match serverVariable="RESPONSE_LOCATION" pattern="/logout(.*)" />
<action type="Rewrite" value="/fts{R:0}" />
</rule>
<rule name="ChangeLogin">
<match serverVariable="RESPONSE_LOCATION" pattern="/login(.*)" />
<action type="Rewrite" value="/fts{R:0}" />
</rule>
<rule name="ChangeGo">
<match serverVariable="RESPONSE_LOCATION" pattern="/go(.*)" />
<action type="Rewrite" value="/fts{R:0}" />
</rule>
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
<match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script, CustomTags" customTags="dataHref" pattern="^/(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true" />
<action type="Rewrite" value="https://dmstest.psc.sc.gov/fts/{R:1}" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
<customTags>
<tags name="dataHref">
<tag name="tr" attribute="data-href" />
</tags>
</customTags>
</outboundRules>
<rules>
<clear />
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="http://localhost:8080/{R:1}" />
</rule>
</rules>
</rewrite>
<urlCompression doStaticCompression="false" doDynamicCompression="false" />
</system.webServer>
</configuration>