Forum Discussion
VIP redirect to another VIP
Certainly. There are at least two ways:
-
Explicit HTTP redirect - this is where you issue an explicit 302 redirect to send the client browser somewhere else. It can be done with an iRule, an HTTP class (11.3 and below), or a policy (11.4 and above). It's actually a pretty common use case to redirect from an HTTP VIP to an HTTPS VIP. So common in fact that there's a built-in iRule for it. It might look something like this:
when HTTP_REQUEST { if { ...some condition... } { HTTP::redirect "https://somewhere.else.com" } }You can also use the HTTP::respond command for a bit more flexibility.
when HTTP_REQUEST { if { ...some condition... } { HTTP::respond 301 Location "https://somewhere.else.com" } } -
VIP targeting - this is where you basically put one VIP in front of another one. The external VIP would have your publicly-accessible destination IP and port, and would forward the traffic to the internal, potentially non-routable VIP via an iRule and the virtual command. Here's an example:
when HTTP_REQUEST { if { ...some condition... } { virtual internal-vs } }where "internal-vs" is the name of the internal VIP.
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