Forum Discussion
galou_31358
Jun 14, 2011Nimbostratus
transform juniper redirector and cluster to VS using irule
Hi all
I'm new in iRule developping, i would like just transforming this redirector and cluster Juniper DX to a virtual server.
Do i need to create to 2 VS, one VS for redirect using an irule and a second standard VS with snat automap?
In this configuration, the user is redirected from 1.2.3.4:80 to the cluster 1.2.3.4:8080 with a new URI:new_uri/test
set cluster foo listen vip 1.2.3.4
set cluster foo listen netmask 255.255.255.255
set cluster foo listen port 8080
set cluster foo target host 5.6.7.8:8080
set cluster foo target name foo.bar.com
set redirector foo listen netmask 255.255.255.255
set redirector foo listen port 80
set redirector foo name foo
set redirector foo listen vip 1.2.3.4
set redirector foo port 8080
set redirector foo protocol http
set redirector foo host foo.bar.com
set redirector vega customurl new_uri/test
Thanks for your help.
5 Replies
Sort By
- It would be simpler to create one HTTP VS on port 80 and another on port 443. The pool for the HTTPS VS would contain the server IP:port 1.2.3.4:8080.
when HTTP_REQUEST { HTTP::redirect "https://foo.bar.com/new_uri/test" }
- Hi Aaron
- You could use this if the second VS is HTTP on port 8080:
when HTTP_REQUEST { HTTP::redirect "http://foo.bar.com:8080/new_uri/test" }
- Thanks Aaron.
- A redirect and the HTTP::uri command are different. If you want to just replace the URI for this particular request between the LTM and the back end servers, HTTP::uri will do just that. However, if you want to issue a redirect to the client so they make a new connection to a different specified host/URI and permanently move the transaction over to that location, then HTTP::redirect is your ticket.
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