Forum Discussion
Hello Chethan.
Below one example of using URI replacement (first statement) and redirect (second statement).
when HTTP_REQUEST {
if { [HTTP::host] contains "www.example.fr" } {
HTTP::uri /ckpartner
} elseif { [IP::addr [IP::client_addr] equals 10.10.10.0/24] } {
HTTP::redirect "http://www.example.fr/ckpartner/"
}
}
Note that in the redirect command you should use the adequate scheme (http:// or https://)
Please, don't forget to mark this answer as "the best" if it was helpful.
KR,
Dario.
Jan 24, 2020
Try this
when HTTP_REQUEST {
if { ([IP::addr [IP::client_addr] equals 10.10.10.1]) && ([HTTP::host] contains "www.example.fr") } {
if { [HTTP::path] equals "/" } {
HTTP::redirect "/ckpartner/"
log local0. "Redirection to /ckpartner"
}
}
}
KR,
Dario.