Forum Discussion
Alexander_01_13
Nimbostratus
Oct 31, 2014irule for choosing pool and rewriting
Hi experts,
I need to write an irule for the following rewriting task.
http://host.domain.tld/example1/appname >> http://[example1_pool]/appname
http://host.domain.tld/example2/appname >> ht...
Vijay_E
Cirrus
Nov 02, 2014
when HTTP_REQUEST {
set HOST [string tolower [HTTP::host]]
set HOST [string tolower [HTTP::uri]]
if { ($HOST eq "host.domain.tld") and ($URI eq "/example1/appname")} {
HTTP::uri [string map {"/example1" ""} [HTTP::uri]]
HTTP::host [string map {"host.domain.tld" "example1_pool"} [HTTP::host]]
pool APPNAME_POOL_example1
}
}
You would have to run some curl commands to figure out the response from the servers and possibly make changes to the response headers.
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