Forum Discussion

Moayad_Hamdan_3's avatar
Moayad_Hamdan_3
Icon for Nimbostratus rankNimbostratus
Dec 02, 2016

irule based on referrer value

Hello every one. I want to redirect the traffic received from SharePoint server based on the referrer value to SharePoint pool.

 

referrer value is https://x.x.com/yy pool is sp13

 

I need the irule to check if referrer equals the value mentioned above or contains yy ,then redired the traffic to sp13 pool.

 

your help is much appreciated

 

2 Replies

  • Try this:

    when HTTP_REQUEST {
        set referer_value [HTTP::header value Referer]
        log local0. "\[HTTP::uri\]: [HTTP::uri]"
        log local0. "\[HTTP::header value Referer\]: [HTTP::header value Referer]"
    
        if { $referer_value eq "https://x.x.com/yy" } {
            log local0. "Redirect to pool sp13"
            pool sp13
        }
    }
    
  • load balancer once he receives the request from sharepoint without \site1 or \site2 he will check the IP then redirect the traffic to pool1 or pool2 based on that ip instead of sending the traffic to default pool.