URL Rewrite Rule Assistance











up vote
0
down vote

favorite












I'm looking to create a rule that redirects all of our NON quoting customer landing pages to their appropriate member center URL. See below for an example and an example of my rule.



What I want-



NON Quoting Whitelabel: customer.EXAMPLE.com redirects to customer.EXAMPLE.com/portal



Quoting Whitelabel: customer.EXAMPLE2.com or just EXAMPLE.com doesn't do a redirect.



Seems simple enough right?



Below are some rules I've tried...



`<rule name="Exclude - White Label Portal" enabled="true" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAny" trackAllCaptures="false">
<add input="{PATH_INFO}" pattern="/y/(.*)$" />
<add input="{PATH_INFO}" pattern="/css(.*)$" />
<add input="{PATH_INFO}" pattern="/portal$" />
</conditions>
<action type="None" />
</rule>
<rule name="White Label Portal" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^(.*)$" ignoreCase="true" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="^(.*)customer.example.com/?$" negate="true" />
</conditions>
<action type="Redirect" url="http://{HTTP_HOST}/portal" />`


The above code does exactly what I want, but what's happening is that my other EXAMPLE.com or customer.EXAMPLE2.com websites are now redirecting to EXAMPLE.com/portal when I don't want them to.



Keep in mind if it's possible to control all my whitelabels within this rule that would be ideal.



Also my Exclude rule is there specifically for some UMBRACO pieces that break if I don't put that rule there.



Any help would be greatly appreciated.



Thanks!










share|improve this question


























    up vote
    0
    down vote

    favorite












    I'm looking to create a rule that redirects all of our NON quoting customer landing pages to their appropriate member center URL. See below for an example and an example of my rule.



    What I want-



    NON Quoting Whitelabel: customer.EXAMPLE.com redirects to customer.EXAMPLE.com/portal



    Quoting Whitelabel: customer.EXAMPLE2.com or just EXAMPLE.com doesn't do a redirect.



    Seems simple enough right?



    Below are some rules I've tried...



    `<rule name="Exclude - White Label Portal" enabled="true" stopProcessing="true">
    <match url="^(.*)$" />
    <conditions logicalGrouping="MatchAny" trackAllCaptures="false">
    <add input="{PATH_INFO}" pattern="/y/(.*)$" />
    <add input="{PATH_INFO}" pattern="/css(.*)$" />
    <add input="{PATH_INFO}" pattern="/portal$" />
    </conditions>
    <action type="None" />
    </rule>
    <rule name="White Label Portal" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
    <match url="^(.*)$" ignoreCase="true" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
    <add input="{HTTP_HOST}" pattern="^(.*)customer.example.com/?$" negate="true" />
    </conditions>
    <action type="Redirect" url="http://{HTTP_HOST}/portal" />`


    The above code does exactly what I want, but what's happening is that my other EXAMPLE.com or customer.EXAMPLE2.com websites are now redirecting to EXAMPLE.com/portal when I don't want them to.



    Keep in mind if it's possible to control all my whitelabels within this rule that would be ideal.



    Also my Exclude rule is there specifically for some UMBRACO pieces that break if I don't put that rule there.



    Any help would be greatly appreciated.



    Thanks!










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm looking to create a rule that redirects all of our NON quoting customer landing pages to their appropriate member center URL. See below for an example and an example of my rule.



      What I want-



      NON Quoting Whitelabel: customer.EXAMPLE.com redirects to customer.EXAMPLE.com/portal



      Quoting Whitelabel: customer.EXAMPLE2.com or just EXAMPLE.com doesn't do a redirect.



      Seems simple enough right?



      Below are some rules I've tried...



      `<rule name="Exclude - White Label Portal" enabled="true" stopProcessing="true">
      <match url="^(.*)$" />
      <conditions logicalGrouping="MatchAny" trackAllCaptures="false">
      <add input="{PATH_INFO}" pattern="/y/(.*)$" />
      <add input="{PATH_INFO}" pattern="/css(.*)$" />
      <add input="{PATH_INFO}" pattern="/portal$" />
      </conditions>
      <action type="None" />
      </rule>
      <rule name="White Label Portal" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
      <match url="^(.*)$" ignoreCase="true" />
      <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
      <add input="{HTTP_HOST}" pattern="^(.*)customer.example.com/?$" negate="true" />
      </conditions>
      <action type="Redirect" url="http://{HTTP_HOST}/portal" />`


      The above code does exactly what I want, but what's happening is that my other EXAMPLE.com or customer.EXAMPLE2.com websites are now redirecting to EXAMPLE.com/portal when I don't want them to.



      Keep in mind if it's possible to control all my whitelabels within this rule that would be ideal.



      Also my Exclude rule is there specifically for some UMBRACO pieces that break if I don't put that rule there.



      Any help would be greatly appreciated.



      Thanks!










      share|improve this question













      I'm looking to create a rule that redirects all of our NON quoting customer landing pages to their appropriate member center URL. See below for an example and an example of my rule.



      What I want-



      NON Quoting Whitelabel: customer.EXAMPLE.com redirects to customer.EXAMPLE.com/portal



      Quoting Whitelabel: customer.EXAMPLE2.com or just EXAMPLE.com doesn't do a redirect.



      Seems simple enough right?



      Below are some rules I've tried...



      `<rule name="Exclude - White Label Portal" enabled="true" stopProcessing="true">
      <match url="^(.*)$" />
      <conditions logicalGrouping="MatchAny" trackAllCaptures="false">
      <add input="{PATH_INFO}" pattern="/y/(.*)$" />
      <add input="{PATH_INFO}" pattern="/css(.*)$" />
      <add input="{PATH_INFO}" pattern="/portal$" />
      </conditions>
      <action type="None" />
      </rule>
      <rule name="White Label Portal" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
      <match url="^(.*)$" ignoreCase="true" />
      <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
      <add input="{HTTP_HOST}" pattern="^(.*)customer.example.com/?$" negate="true" />
      </conditions>
      <action type="Redirect" url="http://{HTTP_HOST}/portal" />`


      The above code does exactly what I want, but what's happening is that my other EXAMPLE.com or customer.EXAMPLE2.com websites are now redirecting to EXAMPLE.com/portal when I don't want them to.



      Keep in mind if it's possible to control all my whitelabels within this rule that would be ideal.



      Also my Exclude rule is there specifically for some UMBRACO pieces that break if I don't put that rule there.



      Any help would be greatly appreciated.



      Thanks!







      url-rewriting






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 18 at 19:34









      SteiN

      11




      11





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53364712%2furl-rewrite-rule-assistance%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53364712%2furl-rewrite-rule-assistance%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          If I really need a card on my start hand, how many mulligans make sense? [duplicate]

          Alcedinidae

          Can an atomic nucleus contain both particles and antiparticles? [duplicate]