Ian_105608
Feb 03, 2010Nimbostratus
Customer Defined Functions
Gday,
We are using HTTP::path to do HTTP routing decisions. We have some fairly long irules that have many applications on a virtual server pointing to several different servers.
One thing we'd like to do is emulate Apache named virtual hosting in an iRule. The thing holding us back is we'd end up with mass nested difficult to read irules like :
when HTTP_REQUEST {
if { [HTTP::host] equals "site" } {
if { [HTTP::path] starts_with "/" } {
pool blah
}
}
}
Ad naseum for multiple hosts / paths. What I'd like to do is change the nested if to call another irule that contains the path decision.
So something like :
when HTTP_REQUEST {
if { [HTTP::host] equals "site" } {
call somesite_directory(request_object);
}
}
Did a bit of googling but couldn't find anything.
Any ideas?
Cheers,
Ian