Forum Discussion
Karthik_Krishn1
Cirrostratus
Oct 03, 2016IRule to select Virtual server based on Incoming URI
Hello,
I am trying to setup an irule such that traffic based on certain URL's is directed towards the appropriate virtual servers. Essentialy we have mutliple URL's " siteA.domain.com" , "siteB....
strain17
Nimbostratus
Oct 03, 2016karthik,
If I understand you correctly, I think you are trying to route by HTTP host. If so, you'll have to use [HTTP::host] instead of [HTTP:uri].
when HTTP_REQUEST {
if {[HTTP::host] contains "siteA.domain.com"} {
log local0. "SiteA Access" virtual vs_SiteA_prod
}
}
See the following: https://devcentral.f5.com/wiki/iRules.HTTP__host.ashx
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
