Forum Discussion
irshad
Nimbostratus
Jun 02, 2020IRULE FOR SOME URI FORWARD REST REJECT
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 }
}
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
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects