question

vanHautChristian-2606 avatar image
0 Votes"
vanHautChristian-2606 asked SamWu-MSFT commented

URL Rewrite tool to exclude specific SharePoint sites

Hello,

I am wondering if anyone can advise how to configure URL Rewrite tool correctly. The goal is that the rule must not take any action if client uses https already.

Challenge:
We configured our SharePoint sites to also support HTTPS. For a smooth transition from HTTP to HTTPS, we installed URL Re Rewrite tool to automatically redirect users.

Issue
Redirection of SharePoint content is not officially supported. We already noticed that the one or other item won't work. for instance, OnteNote files we switched to HTTPS using a script. But we also observed that SharePoint calendars linked to Outlook stop to work even though they were newly linked using HTTPS. Is seems like the rule we set up always redirects and therefore not only if HTTP is used.

GOAL
We need to make sure that one HTTPS is used by the client, URL Rewrite will not kick in anymore.

Current settings
That rule redirects http to https but also seem to kick in when https is used already.
Match URL:
Requested URL: Matches the Pattern
Using: RegEx
Pattern: (.*)

Conditions:
Input: {HTTPS}
Pattern: ^OFF$

Action:
Action type: Redirect
Redirect URL: https://{HTTP_HOST}/{R:1}
Redirect type: Permanent


Thank you in advance!

windows-server-iis
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@vanHautChristian-2606
Have you tested your url rule? it is no problem. If the client already uses https, then the Input: {HTTPS} Pattern: ^OFF$ in the condition will not be satisfied, and the redirection will not be performed. Note: Clear the cache when you test, otherwise it will affect your test results.

0 Votes 0 ·

1 Answer

vanHautChristian-2606 avatar image
0 Votes"
vanHautChristian-2606 answered SamWu-MSFT commented

@SamWu-MSFT Thank you for your quick reply. I have tested the rule(s). The first condition "(.*) always applies, of course. Interestingly, the second condition "Input: {HTTPS} Pattern: ^OFF$" does not work out at all. So this condition is not met with and without using HTTPS.

But even though the condition is not met, the Re Write rule takes effect. I think so because the issue in regards to Outlook calendars occurs if the rule is enabled and does not occur if disabled. This is driving me nuts.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@@vanHautChristian-2606 You can try using failed request tracing to get the detailed process, which should help you find the reason.

0 Votes 0 ·