Chris_Olson_172
Dec 11, 2018Nimbostratus
irule to Block specific URLs, allow the rest
I need to block traffic from two explicit URLs, but allow all other traffic even if it starts with the same characters as what is blocked. This is my best guess at syntax. Please correct any errors you see.
when HTTP_REQUEST { if { ( [string tolower "[HTTP::host][HTTP::path]"] equals "example.domain.com/xyz/ab/" ) or if { ( [string tolower "[HTTP::host][HTTP::path]"] equals "example.domain.com/xyz/ab" ) reject } } }
Any other iteration that starts the same but has additional characters like "example.domain.com/xyz/ab/abc123/..." should be allowed. Is the equals parameter sufficient?