Forum Discussion
Narendra_26827
Jul 14, 2011Nimbostratus
iRule for redirecting requests
Hi, We have vip on port 80 with default pool having all members(on different ip addresses) on port 80. Now we have requirement like this when following HTTP::uri comes on this ...
Michael_Yates
Jul 14, 2011Nimbostratus
Hi Narendra,
Create pools that you have listed:
default pool members - 192.168.159.133:80 , 192.168.159.134:80
channel pool members - 192.168.159:133:8088 , 192.168.159:134:8088
space pool members - 192.168.159:133:8089 , 192.168.159:134:8089
gateway pool members - 192.168.159:133:8087 , 192.168.159:134:8087
The port translation on the Virtual Server is enabled by default, so you should not have to worry about that.
For the iRule try this:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/api/channel/*" { pool channelpool }
"/api/space/*" { pool spacepool }
"/api/gateway/*" { pool gatewaypool }
default { pool defaultpool }
}
}
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