Forum Discussion
7 Replies
Sort By
- Kevin_StewartEmployeeTry this:
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/url1" { pool pool1 } "/url2" { pool pool2 } default { pool pool1 } } }
- KTrout_49248NimbostratusAgain, forgive the stupidity here.
- Kevin_StewartEmployeeThis is assuming that you have more than one pool of web servers, otherwise configure the virtual server profile to point to a single defined pool on the resources tab.
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/url1" { pool web } "/url2" { pool web2 } default { pool web } } }
- winifred_corbetNimbostratusAlong those same lines, I need to retain the full URI coming in. So, url1/otherfile.html also needs to be directed to pool web, but keep it's full path. Would this rule above still be valid?
- winifred_corbetNimbostratusAlso, how do I handle someone coming in as http://www.mysite.com/ with no URI, I need a URI of "/" to redirected to correct pool as well.
- Kevin_StewartEmployeeThe uri won't be affected by the load balancing, so the server will get the whole thing. There's two ways to catch the base "/", using this structure, that I can think of. Perhaps one of the gurus can confirm this:
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/url1*" { pool web } "/url2*" { pool web2 } "/" { pool web } default { pool web } } }
- Nicolas_MenantEmployeeif you have a lots of different uri to filter you should have a look at creating class with the findclass commands: Click here