Forum Discussion
P_K
Oct 12, 2017Altostratus
If you already have a IP datagroup then.. try this
when HTTP_REQUEST {
if { [class match [IP::client_addr] equals IP_group] && [string tolower [HTTP::uri]] contains "/d" } {
HTTP::redirect "https://abc.de.com[HTTP::uri]"
}
elseif { [class match [IP::client_addr] equals IP_group] && [string tolower [HTTP::uri]] contains "/e" } {
HTTP::redirect "https://abc.de.com[HTTP::uri]"
}
}
Please note that uri path that contains is only redirected to path before the , everything after will be sliced away. In your case, it will only redirect to https://abc.de.com/ since you have a symbol after that.
Hash sign is treated as fragment and path after is never sent to server by any browser. Hope this helps!