Forum Discussion
Redirect to another virtual server
Hi Everyone,
Can anyone help me, can irule do this.
VS 1: 172.16.2.74 port 9999 Pool - 172.16.2.208 port 9999 and 172.16.2.209 port 9999
VS 2: 172.16.2.74 port 9988 Pool - 172.16.2.208 port 9988 and 172.16.2.209 port 9988
So basically, 172.16.2.74 is binded with a hostname abc.company.com
How can we set usign irule or any other things that when the user access this abc.company.com he will be redirected either on VS1 or VS2?
4 Replies
- BinaryCanary_19Historic F5 Account
YOu must create a virtual server for 172.16.2.74 Port 80.
On this virtual server, you have an irule like this for example
when HTTP_REQUEST { virtual VS1 }Assuming that the virtual you want is called VS1 and they are all in the same administrative partition.
To choose either VS1 or VS2, you will need perhaps an if Condition that makes a decision which of the VS to send the traffic to.
Also, you can simplify your configuration greatly by simply attaching the pool directly on the Virtual for 172.16.2.74 port 80. The pool member ports do not have to be the same as the virtual server port. LTM will transparently translate the port when it sends the traffic to the pool member.
- BinaryCanary_19Historic F5 Account
YOu must create a virtual server for 172.16.2.74 Port 80.
On this virtual server, you have an irule like this for example
when HTTP_REQUEST { virtual VS1 }Assuming that the virtual you want is called VS1 and they are all in the same administrative partition.
To choose either VS1 or VS2, you will need perhaps an if Condition that makes a decision which of the VS to send the traffic to.
Also, you can simplify your configuration greatly by simply attaching the pool directly on the Virtual for 172.16.2.74 port 80. The pool member ports do not have to be the same as the virtual server port. LTM will transparently translate the port when it sends the traffic to the pool member.
- Allanwynn_16283
Nimbostratus
Hi can you give an example for a condition, i really not yet that familiar with irule.
- BinaryCanary_19Historic F5 Account
Irules Introduction is here. Chapter 2 covers if conditions:
https://devcentral.f5.com/articles/irules-101-01-introduction-to-irules
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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