Forum Discussion
mbohre_59527
Nimbostratus
Jun 01, 2010Forward HTTP request to different pools based on URI
I need help in creating a iRule that will forward the user request to appropriate pool based on URI.
For example, we have three sites www.xyz.com, www.abc.com, and www.test.com . All three ...
Michael_Yates
Nimbostratus
Jun 01, 2010This will do it for the [HTTP::uri]:
when HTTP_REQUEST {
switch -glob [string tolower[HTTP::uri]] {
"/content1*" { pool pool.for.content1 }
"/content2*" { pool pool.for.content2 }
"/content3*" { pool pool.for.content3 }
default { HTTP::redirect http://[getfield [HTTP::host] ":" 1]/content1 }
}
}
It looks like your might want to do it for the [HTTP::host] though.
Example: http://www.website.com/subcontent/index.html
[HTTP::host] = www.website.com
[HTTP::uri] = /subcontent/index.html
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