01-Mar-2022 01:24
Hi
I would like to check if specific query parameter (ids) in url is above some numeric value (300), if yes then redirect to specific page.
Sample https request: https://xyz.ab/some/path/additition?lang=en&ids=300
How to check if this parameter is only number and not string ?
Sample irule
WHEN HTTP_REQUEST {
if {[HTTP::uri] starts with "/some/path" and [URI::query [HTTP::uri] ids ] > 300 }
{ HTTP::redirect "https://xyz.ab/404.html" }
}
When i add some string to ids for example ids=300ab above irule also redirects so how to validate this query parameter so that if and only if it is a number and is above 300 it will redirect to specific page ?
01-Mar-2022 01:51 - edited 01-Mar-2022 02:03