Forum Discussion

stevanskoric_31's avatar
stevanskoric_31
Icon for Nimbostratus rankNimbostratus
May 03, 2017

Block URL using WildCard

Hi,

 

Can someone assist me with creating an iRule that will block/reject request for URL with wildcard?

 

Example: (reject request for url below)

 

http://.domain.com/abc/abc/

 

Please let me know or point me to document that might explain this.

 

Thank you, S

 

  • forum has "removed" wildcard.

     

    URL is http://[wildcard].domain.com/abc/abc/[wildcard]

     

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    Here's one in its simplest form:

    when HTTP_REQUEST {
        if { ( [string tolower [HTTP::host]] ends_with ".domain.com" ) && ( [HTTP::path] starts_with "/abc/abc/" ) } {
            reject
        }
    }