0
votes

I have several sites set up that are using a URL Rewrite to direct Http to Https.

All sites are setup with two sub-folders. Example:

  1. http://www.example.net
  2. http://www.example.net/abc
  3. http://www.example.net/xyz

This is my current URL Rewrite Inbound Rule settings:

  • Pattern: (.*)
  • Condition input: {HTTPS}
  • Check if input string: Matches the Pattern
  • Pattern: ^OFF$
  • Action Type: Redirect
  • Redirect URL: https://{HTTP_HOST}/{R:1}
  • Redirect type: Permanent (301)

All three re-direct to Https perfectly.

However, I need to exclude one of the sub folders from this rule and NOT re-direct it to Https (http://www.example.net/abc).

Could this be accomplished by modifying the existing rule condition? Or even better, by adding an additional rule or rule condition?

1

1 Answers

0
votes

You can modify the existing rule and add additional condition: enter image description here

Condition input: {REQUEST_URI}

Check if input string: Does Not Match the Pattern

Pattern: ^/abc

With this condition, rule will exclude all URLs, which starting from abc. For example, these URLs will be excluded:

  • /abc
  • /abcdef
  • /abc/xyz