Forum Discussion

Topiata_301614's avatar
Topiata_301614
Icon for Nimbostratus rankNimbostratus
Dec 03, 2016

Irule for checking http path and push to a pool

How do I define irule which checks http request and ifit matches path x push it to pool 1 else discard the packet or return http code 404

 

1 Reply

  • M_2's avatar
    M_2
    Icon for Altocumulus rankAltocumulus

    Can you try this 🙂

    when HTTP_REQUEST {
    if { [string tolower [HTTP::host]] equals "host.domain.com" } {
        if { [string tolower [HTTP::uri]] equals "/path" } {
            Pool poolA
        } else {
            HTTP::respond 404
        }
    }
    }
    

    -SAM