jdalyasc_295749
Sep 15, 2017Nimbostratus
iRule for directing a uri to a port
I am fairly new to iRules so forgive me if this is a simple or dumb question.
Is it possible to configure an irule such that a HTTP request to a web URL can be identified by the information following the host name.
For example the hostname being website.com
Would it be possible using an iRule to perform a sort of case statement
website.com/part1 ---> server:80
website.com/part2 ---> server:81
website.com/part3 ---> server:82
Looking through some other iRule requests it seems the following could be close.
when HTTP_REQUEST {
if { [HTTP::uri] equals "/part1" } {
HTTP::redirect ":80"
}
else { [HTTP::uri] equals "/part2" } {
HTTP::redirect ":81"
}
}
Thank you