Forum Discussion
Kai_Wilke
Apr 07, 2017MVP
Hi Terry,
you may take a look to the iRule below. The rules uses two nested [if] statements to avoid variable usage.
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "xxsupplier.xx.com" } then {
if { [string tolower [HTTP::uri]] starts_with "/supplierguide" } then {
HTTP::respond 302 Location "https://xxsupplier.xx.com/supplier_guide.html"
} else {
HTTP::respond 302 Location "https://xxsupplier.xx.com[HTTP::uri]"
}
} else {
Request for unknown host name.
}
}
Cheers, Kai