Forum Discussion

Song_chi_woon_2's avatar
Song_chi_woon_2
Icon for Nimbostratus rankNimbostratus
May 16, 2007

special web page redirection

Hi

 

I want to make a new page (ie.iRule) which will stop accessing from outside in case web pages are down due to an expected obstacle.

 

For example, www.abc.com , www.abc1.com , abc2.com have problems, I want to make a rule to use www.test.com by redirection.

1 Reply

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    While you can't check external websites or URLs, you can absolutely make use of the monitor status of the pools on your BIG-IP. So, assuming that abc.com, abc1.com and abc2.com are in a pool (either the same pool or individual pools), you could check to see if those nodes are marked up by your monitors, and direct traffic accordingly.

    You'll want to make use of the LB::status and/or the active_members command(s) to perform these checks.

    A simple example would be something like:

    
    when HTTP_REQUEST {
      if { [active_members abcPool] > 0 } {
        pool abcPool
      } else {
        HTTP::redirect "http://www.test.com"
      }
    }

    Let us know if you've got any questions.

    Colin