Forum Discussion
fbdeir_29119
Nimbostratus
Jun 16, 2011forwarding
Hi,
I want to forward traffic destined to certain directory to a specific
server, like traffic coming to
:https://www.mydomaion.com/access/index.aspx to be forwarded directly
to server with ip address 192.168.10.15 . any idea on how to achieve
that using iRules?
- nitass
Employee
is something like this?when HTTP_REQUEST { if {[string tolower [HTTP::host]] equals "www.mydomaion.com" and \ [string tolower [HTTP::uri]] equals "/access/index.aspx"} { node 192.168.10.15 80 } }
- fbdeir_29119
Nimbostratus
Me is iRules newbie , so you reckon will work? - hoolio
Cirrostratus
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_12Historic F5 Accountnitass' 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.
- fbdeir_29119
Nimbostratus
many thanks nitass and all
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects