redirect publish web sites based on host header to apm apolicy

im publising my sites via F5 APM i have only one external ip listner and i would like F5-APM to redirect the request based on hostname header xxx.example.com --->x.x.x.x yyy.examole.com--->y.y.y.y to the desired web site i have set a data group name “Pool_data_group” with this entries product.example.com :=prodcut sales.exapmle.com :=sales product and sales is diffrent access profle

my irule looks like this but its not working i get into the default “Virtual publish-site”

when HTTP_REQUEST { set app_pool [class match -value -- [HTTP::host] equals Pool_data_group] if {$app_pool ne “”} {

log for debug

log local0.alert “pool String Value $app_pool” WEBSSO::select $app_pool } else { virtual Publish-Site } }

Hi,

if you are running version 11.4 or above, you can assign pool with local traffic policies.

hi this my verBIG-IP 11.6.0 Build 5.0.429 Hotfix HF5 can you be more specific regarding you answare what do i need to change in my irule

i have a data group “Pool_data_group” prodcus.example.com:=product sales.example.com:=sales

when HTTP_REQUEST { set app_pool [class match -value -- [HTTP::host] equals Pool_data_group] if {$app_pool ne “”} {

log for debug

log local0.alert “pool String Value $app_pool” WEBSSO::select $app_pool } else { virtual Publish-Site } }

Hi

Local traffic policies is a new tool to create a set of rule in GUI instead of creating irules and data groups.

you can create it in policies menu with following configuration:

  • requires : http
  • controls : forward:
  • rule 1 :
    • conditions :
    • actions :
      • forward pool poolX
      • tcl set variable WebSSO SSOX
  • rule 2 :
    • conditions :
    • actions :
      • forward pool poolY
      • tcl set variable WebSSO SSOY
  • ..
  • rule default :
    • conditions :
      • none
    • actions :
      • forward virtual Publish-Site

add the following codeshare irule to assign websso profile stored in WebSSO variable.

10x for your prompt respond however as i said i have only one virtual adreess who need to pass traffic based on host header and not just “sso websso” but aslo full access to a cerain access-policy Tia tal

Yes, I understand you have only one virtual address.. the local traffic policy is a new tool allowing to create rules based on conditions and executing actions… in my example, for the xxx hostname, it change pool to poolX and assign the WebSSO variable with SSOX… when previously, you needed to create a new record in data group, you need to create a new rule in the local traffic policy