redirecting to a specific L4 port

I have several irules to write which key off of something in the uri, and then redirect to a specific layer 4 port number. Below is what I have come up with so far:

when HTTP_REQUEST {

if {[HTTP::uri] contains “mysite”} {pool Mysite_Sharepoint_16836}

}

What am I doing wrong? I do not need (nor want) and ‘else’ option, but is one required?

Thanks in advance,

Brett

Hi it should be fine,

What exactly is the issue you face?

when HTTP_REQUEST {
  if {[HTTP::uri] contains "mysite"} {
     pool Mysite_Sharepoint_16836}
  }

Do you have any tcl error message in /var/log/ltm ?

To test your iRule you can add logging information that will be added too in /var/log/ltm when you’ll do your testing:

when HTTP_REQUEST {
  log local0. "HTTP REQUEST: [HTTP::uri]"
   if {[HTTP::uri] contains "mysite"} {
     log local0. "uri contains mysite!"
     pool Mysite_Sharepoint_16836}
  }