Forum Discussion
Tony_Lee_73702
Nimbostratus
Oct 13, 2005HTTP rewrite for lots of URLs
Hi all,
I've got a pair of 3400s running 9.0.5. I've created a HTTP-based VS load balancing traffic against a handful of IIS servers.
I'm in a web hosting environment and I've got a situation where I need to do URL rewrites for the each customer on the BigIP.
http://www.A.com/ ---> http://www.IIS_node.com/A
http://www.B.com/ ---> http://www.IIS_node.com/B
.
.
etc (there's a *significant* number of customers... at least 100)
I thought of using the following iRule and I want to see if it made sense.
-------------
when HTTP_REQUEST {
set http_host HTTP::host
switch http_host {
"www.A.com" {HTTP::redirect "http://www.my_vs.com/A/"}
"www.B.com" {HTTP::redirect "http://www.my_vs.com/B/"}
}
}
-------------
Thanks - AJ
12 Replies
- Richard__HarlanHistoric F5 AccountWe are running version 9.1
- unRuleY_95363Historic F5 AccountThere is also the URI::decode/URI::encode commands that will decode/encode a URI into rfc compliant form. eg: with decode, %2b will become + and with encode + will become %2b.
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