Forum Discussion
SanjayP
Apr 12, 2021Nacreous
Try below
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/" {
HTTP::respond 301 Location "https://example.com/content"
}
"/admin*" {
if { [class match [IP::client_addr] equals "datagroup_internal"] } {
HTTP::respond 301 Location "https://example.com/#/login"
} else {
reject
}
}
"/pwreset*" {
HTTP::respond 301 Location "https://example2.com/xxx"
} default {
return
}
}
}
- Nikoolayy1Apr 12, 2021MVP
Nice example.