Forum Discussion

Dharmendra_2243's avatar
Dharmendra_2243
Icon for Nimbostratus rankNimbostratus
Oct 08, 2009

DBI:iRule when match with string,divert to pool

1. Create new pool for the sitemap seo project with the following parameters. Nodes (yeswebp1, yeswebp2, and yeswebp3) Port ( 1910 on all three nodes)

 

2. Create the i-Rule on BigIp to redirect traffic to the newly created pool above on the /robots.txt match case for all the UNIWEB production clubs.

 

5 Replies

  • Hi,

     

     

    Do you have a question? Can you explain what you're trying to do, what you've tried and what results you've found?

     

     

    Thanks,

     

    Aaron
  • Question :

     

     

    When any request comes with /robots.txt match case,redirect the traffic to the newly created pool for any website .

     

     

    Please let me know if you need more clarification.
  • Here is an example which selects a separate pool for requests for /robots.txt. All other requests will be sent to the default pool configured on the VIP:

     
     when CLIENT_ACCEPTED { 
      
         Save default pool name 
        set default_pool [LB::server pool] 
     } 
     when HTTP_REQUEST { 
      
         Check requested path 
        switch [HTTP::path] { 
           "/robots.txt" { 
               Request is for /robots.txt, use different pool 
              pool robots_pool 
           } 
           default { 
               Request not for /robots.txt, use default pool 
              pool $default_pool 
           } 
        } 
     } 
     

    Aaron
  • I have other iRules also which needs to be applied.

     

     

    Is this possible,that when the string "/robots.txt" matches it should redirect to the pool.?

     

     

    Else option mentioned will vanishes the other rules already applied.

     

     

  • You might want to add this iRule logic to the existing iRule(s). Or you might need to set a local variable in this iRule which the other iRule(s) reference to know not to select the pool. If you can post the other iRules you're using we can provide suggestions on using them together.

     

     

    Aaron