Forum Discussion

Bryce_Johnson_1's avatar
Bryce_Johnson_1
Icon for Nimbostratus rankNimbostratus
Jun 07, 2006

http redirect based on active pool name

Hello,

 

 

I am new to scripting iRules on the BigIP. I am looking for a rules to redirect to a non-secure URL when the default pool is set to a specific name.

 

 

for example:

 

 

when HTTP_REQUEST {

 

if [pool equals pool_name_here]

 

HTTP::redirect "http://www.urlgoeshere.com"

 

}

 

}

 

 

Should this be as simple as it sounds? Please advise.

 

 

Thanks,

 

 

Bryce Johnson

 

  • You might want to post this over on the iRules forum. iControl is our remote management API.

     

     

    -Joe
  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    There is no way to directly extract the default pool from the config with a rule.

     

     

    You could instead specify a fallback host in the virtual definition, then remove the pool as a resource when you want to force the redirect.

     

     

    /deb