Forum Discussion

fbdeir_29119's avatar
Icon for Nimbostratus rankNimbostratus
Jun 16, 2011


Hi, I want to forward traffic destined to certain directory to a specific server, like traffic coming to : to be forwarded directly to server with ip address . any idea on how to achieve that using iRules?

5 Replies

  • is something like this?

    when HTTP_REQUEST {
         if {[string tolower [HTTP::host]] equals "" and \
              [string tolower [HTTP::uri]] equals "/access/index.aspx"} {
              node 80
  • I'd try setting this up on a test virtual server. Nitass' example will do exactly what you described, but it's worth it to test first.



  • Colin_Walker_12's avatar
    Historic F5 Account
    nitass' code looks solid, and if you're looking to do this for a single URI / host pair it will work just fine (though Aaron's right, always test first). If you're looking to do multiple URI/host pairs, keep the class command in mind (if you're on v10 or later, the findclass command pre v10). Creating a data group that maps the URI to the desired host/port would be ideal for managing large numbers of these mappings, if you need to go that route.