Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Martin 278 posts 662 karma points
    Nov 24, 2017 @ 13:31
    Martin
    0

    Rewrite Rule - Exclude Hostname

    Hi All,

    I have hostnames in the same umbraco cloud install.

    Two of those hostnames are https.

    I have added the following rewrite rule in the web.config file.

    How do I exclude on of my hostnames from the rewrite rule?

    Thanks

    Martin

         <rewrite>
            <rules>
        <rule name="HTTP to HTTPS redirect" stopProcessing="true">
          <match url="(.*)" />
          <conditions>
            <add input="{HTTPS}" pattern="off" ignoreCase="true" />
            <add input="{HTTP_HOST}" pattern="localhost" negate="true" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
        </rule>
      </rules>
         </rewrite>
    
  • Nik 1625 posts 7295 karma points MVP 7x c-trib
    Nov 24, 2017 @ 13:50
    Nik
    0

    Hi Martin,

    You can do something like this:

    <conditions trackAllCaptures="false">
      <add input="{HTTP_HOST}" pattern="*.domain1.com"  />
      <add input="{HTTP_HOST}" pattern="*.domain2.com"  />
    </conditions>
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies