Forum Discussion
Ian_105608
Nimbostratus
Feb 03, 2010Customer 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
- hoolio
Cirrostratus
Hi Ian,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects