URL Rewrite tool to exclude specific SharePoint sites

van Haut, Christian 1 Reputation point
2022-04-20T14:19:32.403+00:00

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 development | Internet Information Services
{count} votes

1 answer

Sort by: Most helpful
  1. van Haut, Christian 1 Reputation point
    2022-04-21T15:51:46.557+00:00

    @Sam Wu-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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.