For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Patrick_Deal_23's avatar
Patrick_Deal_23
Icon for Nimbostratus rankNimbostratus
Oct 21, 2015

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

  • 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 } } }
  • 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.