Forum Discussion

yosry92_331999's avatar
yosry92_331999
Icon for Nimbostratus rankNimbostratus
Dec 03, 2017
Solved

how can i block this url?

Hi ,i want to block this url by irule /browse.php?id=125 i want to block it by id=125   Thank you .  
  • Samir_Jha_52506's avatar
    Dec 03, 2017

    There are many ways to block the ID. I have prepared the below irule which will match ID value

    125
    & reject connection. Use Datagroup class if you have multiple ID.

    when HTTP_REQUEST {
    if { [URI::query [HTTP::uri] id ] contains 125 } {
        log local0. "Query string of URI [HTTP::uri] is [URI::query [HTTP::uri]]"
            reject
            } 
    }
    

    OR-- If you have multiple ID value

        when HTTP_REQUEST {
    value_id is object, you can add multiple id value in class.
           if {(matchclass value_id contains [URI::query [HTTP::uri] id]) } {
         reject
        } 
    }