Allowing access only to specified directories (HTTP::PATH) on hosts using IRULES
Hi Community,
I am a beginner in F5 and would like your help in achieving the following
would like to restrict the traffic to only to the following path(s)
http://hostname.mylab.com/dir1
http://hostname.mylab.com/dir2
http://hostname.mylab.com/dir3
http://hostname.mylab.com/dir4
Could you please tell me if the following IRule will work if not please help me in configuring this.
when HTTP_REQUEST {
if { (([HTTP::host] eq "hostname.mylab.com") and ([HTTP::path] eq "/dir1"))
or (([HTTP::host] eq "hostname.mylab.com") and ([HTTP::path] eq "/dir2"))
or (([HTTP::host] eq "hostname.mylab.com") and ([HTTP::path] eq "/dir3"))
or (([HTTP::host] eq "hostname.mylab.com") and ([HTTP::path] eq "/dir4")) } {
} else {
drop
}
}
I really appreciate your help and support in this
Kind Regards,