cancel
Showing results for 
Search instead for 
Did you mean: 

IRULE FOR SOME URI FORWARD REST REJECT

irshad
Nimbostratus
Nimbostratus

Hi,

 

We have requirement that in URI words contains "inventory" and "price" should forward else should reject.

 

the below irule is not working

 

when HTTP_REQUEST {

 if { [string tolower [HTTP::host]] contains “price” or “inventory” } {

   forward

 } else { discard }

}

1 REPLY 1

Hi,

 

Can you try this:

 

when HTTP_REQUEST { if { ([HTTP::uri] contains "inventory") || ([HTTP::uri] contains "price") } { pool /your-pool } else { discard } }

Instead of pool you could also ure return and make sure your virtual server has a default pool.

 

Cheers,

 

Kees