Forum Discussion

DM_5174's avatar
DM_5174
Icon for Nimbostratus rankNimbostratus
Jul 05, 2007

Redirect to another web server pool based on link

Hi All,

 

 

I am trying to add to my existing 4.x rule where if a user try to

 

connect to another link (site2-5), it will redirect them to the APACHE_WEB_POOL.

 

I have done this in the LTM Version 9x using the Glob statement but could not figure out how to do it on version 4.x.

 

 

http://www.mysite.com/Site1

 

/Site2

 

/Site3

 

/Site4

 

/Site5

 

/image1

 

/image2

 

 

All of this goes to the "Apache_Web_Pool", else goes to IISWEB-Pool.

 

 

 

VERSION 4.x iRule

 

 

if (http_uri contains "Site1") {

 

use pool APACHE_WEB_POOL

 

}

 

else {

 

use pool IISWEB-POOL

 

}

 

 

 

 

VERSION 9.x iRule Sample

 

 

when HTTP_REQUEST {

 

switch -glob [string tolower [HTTP::uri]] {

 

"/site1*" -

 

"/site2*" -

 

"/site3*" -

 

"/site4*" -

 

"/site5*" -

 

"/image1*" -

 

"/image2*"

 

 

{

 

use pool Apache_Web_Pool}

 

}

 

}

 

 

 

 

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    answered here:

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=16&tpage=1&view=topic&postid=1531015319

     

    Click here