We got the URL rewriting the other day (thank you) but we have part of the site that calls an authentication module so that when we put in
http://alpha.internal.com/dir1/JSP/portal_main.jsp
This gets redirected to
https://alpha.internal.com/AUTH/JSP/login.jsp?target=/dir1/JSP/portal_main.jsp
and the user is then displayed with the authentication page. When they fill in the authentication details then they proceed to the site
Is there a way so that the authentication page will still display the original requested link and not the second URL?
What we have currently is
<rule name="Alpha1 Apps" stopProcessing="false"><match url="(.*)" /><conditions logicalGrouping="MatchAll" trackAllCaptures="true"><add input="{URL}" pattern="^/(dir1|dir2|dir3|AUTH)(.*)" /><add input="{HTTP_HOST}" pattern="alpha.internal.com" /></conditions><action type="Rewrite" url="http://beta.internal.com{C:0}" logRewrittenUrl="true" /></rule><rule name="Alpha HTTPS" enabled="true" patternSyntax="Wildcard" stopProcessing="true"><match url="*" /><conditions logicalGrouping="MatchAll" trackAllCaptures="true"><add input="{HTTP_HOST}" pattern="alpha.internal.com" /><add input="{HTTPS}" pattern="off" /></conditions><action type="Redirect" url="https://alpha.internal.com/{R:1}" appendQueryString="true" redirectType="Temporary" /></rule>
What I tried on an outbound rule was
<outboundRules><rule name="Hide auth" preCondition="IsHTML"><match filterByTags="A" pattern="^/AUTH/JSP/login.jsp\?target=([_0-9.a-z-\/]+)$" /><action type="Rewrite" value="{R:1}" /></rule><preConditions><preCondition name="IsHTML"><add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /></preCondition></preConditions></outboundRules>