Forum Discussion

mike03_367540's avatar
mike03_367540
Icon for Nimbostratus rankNimbostratus
Aug 08, 2018

irule to redirect traffic to pool for two url

Looking for an irules to redirect traffic to pool for only two specific url

 

10 Replies

  • Hope its URL. Check it out

         when HTTP_REQUEST {
            if { (string tolower [HTTP::host] equals "www.xyz.com") or (string tolower [HTTP::host] equals "www.pqr.com") } {
            pool pool_common_ABC 
           }
        }
    
    • mike03_367540's avatar
      mike03_367540
      Icon for Nimbostratus rankNimbostratus

      Thanks for quick response can we add else command and rest of traffic should be

       

      rejected when HTTP_REQUEST { if { [string tolower [HTTP::host] equals ";] or [string tolower [HTTP::host] equals ";] } { pool pool_common_ABC } else { reject } }

       

    • Samir_Jha_52506's avatar
      Samir_Jha_52506
      Icon for Noctilucent rankNoctilucent

      Yes. we can use.

          when HTTP_REQUEST {
          if { ([string tolower [HTTP::host]] equals "www.xyz.com") or ([string tolower [HTTP::host]] equals "www.pqr.com") } {
          pool pool_common_ABC 
             } 
         else { 
           reject 
          }
      }