Forum Discussion
Michael_Yates
Sep 27, 2011Nimbostratus
Hi jucao,
Take a look at the domain command. I think that your values need to be corrected from 3 / 2 to 2 / 1.
http://devcentral.f5.com/wiki/iRules.domain.ashx
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] ends_with ".co.uk" } {
set envdomain "[domain $host 2]"
}
elseif {[string tolower [HTTP::host]] ends_with ".com" } {
set envdomain "[domain $host 1]"
}
}
Everything else looks good. Let us know if you have any problems with it.