Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
we have a situation where two rules have similar oldurls:
/website/path/Detail.aspx?id=88795
/website/path/Detail.aspx?id=8879
It looks the 301 package will match on the first rule above when the actual request url is the second one.
In looking at the source code, is this line meant to have a wildcard match in the sql statement? why isn't it a direct match using the '=' operator?
query = "SELECT NodeId, OldUrl FROM infocaster301 WHERE OldUrl LIKE @url + '%' AND IsRegex = 0";
Andrew
the @url parameter just contains the page name without the parameters, thus the % is needed here to deliver any result which contains a query string.
I have compiled the component with
query = "SELECT NodeId, OldUrl FROM infocaster301 WHERE OldUrl LIKE @url + " +
(querystring.HasKeys()?"'?' + '" + querystring + "'":"") + " AND IsRegex = 0";
which delivers the exact URL.
If you use it this way, you will have to configure all possible urls with the exact query string.
Maxemilian
is working on a reply...
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.
Continue discussion
Rule Match Bug
we have a situation where two rules have similar oldurls:
/website/path/Detail.aspx?id=88795
/website/path/Detail.aspx?id=8879
It looks the 301 package will match on the first rule above when the actual request url is the second one.
In looking at the source code, is this line meant to have a wildcard match in the sql statement? why isn't it a direct match using the '=' operator?
Andrew
the @url parameter just contains the page name without the parameters, thus the % is needed here to deliver any result which contains a query string.
I have compiled the component with
query = "SELECT NodeId, OldUrl FROM infocaster301 WHERE OldUrl LIKE @url + " +
(querystring.HasKeys()?"'?' + '" + querystring + "'":"") + " AND IsRegex = 0";
which delivers the exact URL.
If you use it this way, you will have to configure all possible urls with the exact query string.
Maxemilian
is working on a reply...
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.