Forum Discussion
Kevin_Stewart
Sep 10, 2013Employee
Try this:
Data group:
mydomain.ny1.com := /1nyb
mydomain.ny2.com := /2nyb
iRule:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
if { [class match [string tolower [HTTP::host]] equals Prod_Domains_dg] } {
HTTP::redirect [class match -value [string tolower [HTTP::host]] equals Prod_Domains_dg]
}
}
}
The pool, I assume, is already applied to the virtual server. So the above only redirects if the URI equals "/" and then redirects to the URI from the class match. Requests with more specific URIs are ignored.