Forum Discussion

daemien_139983's avatar
daemien_139983
Icon for Nimbostratus rankNimbostratus
Feb 04, 2014

https redirect

Hi all,

 

Pretty new to F5-ltm, and i was wondering if anyone could help?

 

so we have is a site called https://site.mydomain.com/ & https://site.mydomain.com/tranfer on the same vip.

 

what i would like to do is direct which server answers to https://site.mydomain.com/tranfer in the pool, as the site is only installed one of the nodes in that pool.

 

thanks for all your help Daemien

 

5 Replies

  • Try this:

    when HTTP_REQUEST {
        if { [string tolower [HTTP::uri]] starts_with "/transfer" } {
             transfer site - send to specific pool member
            pool my_Pool member 10.1.2.200 80
        } 
    }
    
  • how would i do this if say i had /transfer and /upload and /uat muti nodes same pool.

    Something like this maybe:

    when CLIENT_ACCEPTED {    
        set default_pool [LB::server pool]
    }
    when HTTP_REQUEST {    
        switch -glob -- [string tolower [HTTP::uri]] {        
            "/transfer*" {            
                pool my_pool member 10.200.0.1 80                
            }            
            "/upload*" {            
                pool my_pool member 10.200.0.2 80                
            }            
            "/uat*" {
                pool my_pool member 10.200.0.3 80                
            }            
            default {            
                pool default_pool                
            }            
        }        
    }
    
  • if i connect via https://vip-address/uat it go's to the right server, but if i use https://site.mydomain.com/uat - it go's to the wrong server..

     

    the irule does nothing on fqdn part (site.mydomain.com). is the fqdn resolved to virtual server ip indeed?

     

  • Please make sure that site.mydomain.com actually resolves to the same IP address as the VIP. I'm guessing that it does not. From a command line:

    nslookup site.mydomain.com