disconnect/teminate session if selected URI

Hi,

Is it possible in an iRule to disconnect or terminate a session if the URI matches some value?

I have a specific list of uris that I present/allow through my F5 and if I see something that is not one of them I don’t want to send anything back to the user. I guess this is a sort of stealth mode web server.

Any help appreciated.

Thanks.

Bob

You can have a iRule that sends a 302 redirect based on the URI in a request.

What do you mean by “session?” If you mean the user is logged on, then the 302 redirect could be to the logoff page.

I have not checked the syntax because I have no BigIP nearby right now but this should work.

allowed_uris is a string data group list containing all uris you want to allow

when HTTP_REQUEST {
    if { not [class match [string tolower [HTTP::uri]] equals allowed_uris] }
        reject
        You can also use drop
    }
}

/Patrik