Forum Discussion
jcoleman_105753
Nov 20, 2007Historic F5 Account
Virtual Entry in iRules Wiki
The iRules wiki has the following sample code that is suppose to allow you to "Route the traffic to virtual server instead of normal server selection by load balancing." However, in 9.4.3 and in 9.2....
hoolio
Cirrostratus
Nov 21, 2007Hi,
In versions before 9.4.0, the command 'virtual' would return the name of the virtual server the rule was applied to. In 9.4.0 and later, you'd have to use 'virtual name' to get the name. Also, in 9.4.0 and later, using the virtual command, you could assign one virtual server as the destination for another virtual server. The rules you listed should work find on 9.4.0 and later assuming 'my_post_processing_server' and 'media_80' are both names of virtual servers.
I'd expect the error you posted on 9.2.4. What was the error you saw on 9.4.3? If you use 'virtual NON_EXISTENT_VIP_NAME' you should see:
[can't find virtual] [virtual NON_EXISTENT_VIP_NAME]
Otherwise, it should work on 9.4.x.
Another option would be to send a 30x redirect using HTTP::redirect to the other virtual server.
Aaron
[edit: I updated the wiki page (Click here) to hopefully make this more clear.]
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