Forum Discussion
Nathan_Andrews_
Nimbostratus
Mar 04, 2014iRule required to change URL to public IP address.
Hi,
I have a web application (kronos) that I am currently load-balancing. Due to an ongoing issue with the application iteslf users have to access the app via its public IP address as using a UR...
Kevin_Stewart
Employee
Mar 05, 2014I believe not as I have auto-map configured on the VIP and I can successfully login with https://1.1.1.1/en which is the external VIP IP.
Just to clarify, (SNAT) auto-map is a routing mechanism. If that wasn't working you wouldn't be getting any responses at all from the web server. Your original description stated that the URI "ends in /en". I'm now assuming that it actually starts with "/en", so the iRule would be subtly different:
when HTTP_REQUEST {
replace the Host header
HTTP::header replace Host "1.1.1.1"
select a pool and rewrite URI based on URI
switch -glob [string tolower [HTTP::uri]] {
"/en*" {
pool pool_a
HTTP::uri "/wfc/logon"
}
"/fr*" {
pool pool_b
HTTP::uri "/wfc/logon"
}
}
}
This should at least fix the pool selection.
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