Forum Discussion

JQB's avatar
JQB
Icon for Nimbostratus rankNimbostratus
Jul 30, 2020

irule pool selection based on host AND path

Below is my current irule, which sends all requests with "/up/*" in the path to the faweb pool, otherwise, requests are sent to the default web pool. when HTTP_REQUEST {   switch -glob [string to...
  • Enes_Afsin_Al's avatar
    Aug 02, 2020

    Hi JQB,

    when HTTP_REQUEST {
    	switch [string tolower [HTTP::host]] {
    		"host1.website.com" -
    		"host2.website.com" -
    		"host3.website.com" { pool web }
    		default {
    			switch -glob [string tolower [HTTP::path]] {
    				"/up/*" { pool faweb }
    				default { pool web }
    			}
    		}
    	}
    }