Quantcast
Channel: URL Rewrite Module
Viewing all articles
Browse latest Browse all 2482

ARR, Trailing Slash and HTTPS

$
0
0

Hi,

Here is my setup

LB01 is running IIS with ARR installed.

I have created a farm in ARR that includes WEB01 and WEB02

WEB01 and WEB02 have IIS installed and my web app configured as an application.

The website on LB01 is only available publicy via HTTPS

The website on WEB01 and WEB02 are available privately via HTTP

On LB01 at server level, I have created the following server level rule to route requests for me.mydomain.com to my server farm

<rule name="Redirect for me.mydomain.com">
<match url=".*" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="^me\.mydomain\.com$" />
</conditions>
<action type="Rewrite" url="http://VIP-me.mydomain.com/{R:0}" />
</rule>

Now if I go to https://me.mydomain.com/myapp/ it works fine and routes traffic to http://web01/myapp/ or http://web02/myapp/

It didn't work when using https://me.mydomain.com/myapp (without the trailing slash) so I added the following rule at site level on LB01 to append the trailing slash.


<rule name="AddTrailingSlashRule1" stopProcessing="true">
<match url="(.*[^/])$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Redirect" url="{R:1}/" />
</rule>

This is appending the trailing slash but unfortunately it redirects from https to http which isn't accessible.

So the problem I have is with the two rules aboove when I go to https://me.mydomain.com/myapp I get redirected to http://me.mydomain.com/myapp/

I've tried adding the following force HTTPS rule both at server and site level but these do not resolve the issue.

<rule name="Force HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions><add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
</rule>

Not sure whether this isn't working because I've set it up wrong or because the rule isn't being triggered because http isn't accessible.


Your help would be appreciated.

Thanks,

P


Viewing all articles
Browse latest Browse all 2482

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>