Forum Discussion
May 14, 2014
IRule for reverse proxy with http rewrite
Hi guys,
I need to use F5 like a reverse proxy. My company would like to have clients connect the our company URL and be redirected to an externally hosted website but have the traffic come bac...
Kevin_Stewart
Employee
May 14, 2014Well, technically you cannot perform an HTTP redirect and be transparent to the client. The very nature of an HTTP redirect involves the client. In order to be transparent, and perhaps the only way, is to (reverse) proxy access to that external site through your F5. You would define that external site as either a node or its own pool. Then you could do something like this:
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"/jobs/apply" {
HTTP::uri "/apply"
pool newsite-pool
}
"/jobs/apply/resume-thanks" {
HTTP::uri "/thankyou"
pool newsite-pool
}
"/jobs/privacy" {
HTTP::uri "/privacy"
pool newsite-pool
}
"/jobs/terms" {
HTTP::uri "/terms"
pool newsite-pool
}
default {
pool $default_pool
}
}
}
You'll probably also want to have a OneConnect profile applied to the VIP.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
