Need help writing an iRule to look at the URL request and to redirect if 1 of the URI’s is seen. Example:
ghi.com → redirect to sorry.ghi.com
Want to make sure that abc and def.com continue to pass traffic, but only ghi.com gets redirected to sorry.ghi.com. Thoughts. Thanks.
RGW
Use an HTTP class, not irules, and simply look for “Host header” equals ghi.com or maybe also www.ghi.com, and select “redirect” in the “action” part.
HTTP classes are great, but should you want to use an iRule:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "ghi.com" } {
HTTP::redirect "http://sorry.ghi.com"
}
}