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!
url-rewriting
add a comment |
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!
url-rewriting
add a comment |
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!
url-rewriting
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
url-rewriting
asked Nov 18 at 19:34
SteiN
11
11
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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