Forum Discussion
Multiple Website urls to a single VIP iRule
I have a project to consolidate external addresses being used to press the F-5 ltm to take the redirection brunt of traffic. I have a similar iRule that is redirecting vi the uri (/xxx) and want to inquire if modifying it to the below iRule would work. And then the second part to the question is - how many re-directions can a VIP use?
when CLIENT_ACCEPTED { Save the name of the VS default pool
set default_pool [LB::server pool] }
when HTTP_REQUEST { switch [string tolower [HTTP::host]] { "www.xxx.com" { pool X's_POOL } "www.yyy.com" { pool Y's_POOL } default { pool $default_pool } } }
2 Replies
- Patrick_Deal_23
Nimbostratus
the original iRule is as such. when CLIENT_ACCEPTED { Save the name of the VS default pool set default_pool [LB::server pool] } when HTTP_REQUEST { switch -glob [string tolower [HTTP::path]] { "/smartee*" { pool SMARTEE_PORTAL } "/alertsintegration*" { pool ALERTS-INTEGRATION-7005 } default { pool $default_pool } } } - Brad_Parker
Cirrus
First what you are doing is not redirection, its L7 load balancing or pool selection. issuing a 301 or 302 back to the client is redirection.
A.) yes your iRule should work. 2.) There is no limit, though when your switch gets closer to 10 items you should consider using a data group instead as it will perform better and be easier to manage.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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