Forum Discussion
Joe_46466
Nimbostratus
May 21, 2009URL Rewriting of Hostname
We are upgrading a web farm, named "FarmA" and have built its replacement on new hardware. I have created a new pool named "FarmB". What I would like to do is this:
As applicatio...
May 21, 2009
You have a couple of options with URL rewriting. In your case, if you want to maintain the original hostname, then all you'll have to do is modify the Host HTTP header in the HTTP_REQUEST event on it's way to the backend pool of servers. Something like this should do it:
when HTTP_REQUEST {
if { [HTTP::header "Host"] eq "FarmA" } {
HTTP::header replace "Host" "FarmB"
}
} If you configure this iRule on your FarmA virtual, it will make the uri "http://FarmA/*" look to the backend servers like it is "http://FarmB/*".
Hope this helps.
-Joe
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
