shlomi_133455
Apr 02, 2014Nimbostratus
iRule to Select pool by parsing
Hello, I want to Create an Irule that will forward a request coming to Site1.website.com to pool Site1. I want it to be generic so if i add another pool named SiteXYZ and assign another DNS record named SiteXYZ.website.com it will also take it. I am guessing it will be something like this:
when HTTP_REQUEST { set content [HTTP::host] set PoolName [split $content "."]
if { pool $PoolName[1] Exist } pool $PoolName[1] else return error of somekind
will that work?