Forum Discussion
French_Poul_307
Nimbostratus
Jun 10, 2010iRules for reverse proxy
Hello,
First, I'm sorry for my english ; I'm french and I talk a very bad english...
I'm new with BigIP and with iRules, so I have some difficulties to do what I want... :-(
I have a BigIP 6900, a...
Michael_Yates
Nimbostratus
Jun 10, 2010Your request for information is is pretty broad, but I will give you an example. You must decide what is good traffic in order to route it to a specific pool of servers, and what to do with the rest of the traffic (whether it is bad or doesn't meet any of the criteria set earlier in the iRule).
Here is an example. You have one website that contains conent for three different languages:
http://www.website.com/english
http://www.website.com/french
http://www.website.com/german
You divide your web servers into different pools that host a certain language, and now you must route the traffic to each set of servers depending on the URI.
[HTTP::host] = www.website.com
[HTTP::uri] = /english, /french, or /german
You would place this iRule on the Virtual Server:
when HTTP_REQUEST {
switch -glob [string tolower[HTTP::uri]] {
"/english*" { pool pool.for.english }
"/french*" { pool pool.for.french }
"/german*" { pool pool.for.german }
default { HTTP::redirect http://[getfield [HTTP::host] ":" 1]/english }
}
}
Is this the type of information you were looking for?
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
