Mike_Breeden_62
May 28, 2014Nimbostratus
Redirect Client based on datagroup and mask URI
I have a request from the business to redirect clients to different uri based on if their ip matches a datagroup and if not then it will not redirect or rewrite the uri.
Here is what I have so far but I cannot get it to work properly unless I do the redirect. The one that rewrites the uri does not bring up the full page.
when HTTP_REQUEST {
if {([HTTP::host] equals "site.mike.net") and ([HTTP::uri] equals "/")} { if {[ class match [IP::client_addr] equals "Datagroup_S"]} { Site does not load fully with uri rewrite HTTP::uri "/Site1/SE.aspx"
} elseif {[ class match [IP::client_addr] equals "Datagroup_M"]} {
Site loads properly but new uri is exposed
HTTP::redirect "/Site1/default.aspx" } else { HTTP::uri "/default.aspx" } } }