Persistence for http host url

Hello, I am new on the aFlex world, I have created a few rules myselft, but I might need some help on this next rule… basically what I want is to force persistence when visiting a particular site, for example s1.domain.com I want it to go to the same back end where it last was, so I think the aflex rule would look like this:

when HTTP\_RESPONSE \{
set HOST [HTTP::host]	

persist add uie $HOST 1800

\}
when HTTP\_REQUEST \{
set HOST [HTTP::host]

persist uie $HOST
}
any help on this would be appreciated, thanks

Hello
your syntax is correct. you can also direct the traffic to a particular pool or member if you like below is some additional example

pool

Causes the system to load balance traffic to the specified pool or pool member.

Note: Pool / member may be selected conditionally. If multiple conditions
match, the last match will determine the pool/member to which this traffic
is load balanced.
Example:
Syntax
pool

pool  [member  [] ]

pool

when CLIENT\_ACCEPTED \{
  if \{ [IP::addr [IP::client\_addr] equals 10.10.10.10] \} \{

pool my_pool

 \}
\}