Forum Discussion
jdewing
Cirrus
Nov 05, 2009URI Redirection
I'm new to IRule. I need to write a IRule to redirect to a specific server in the pool based on the path.
For example, https://Server1.com/ExportData should redirect to https://192.1...
hoolio
Cirrostratus
Nov 06, 2009Do you want to check the path (HTTP::path) or the query string (HTTP::query) for the exportdata string? The path is the URI minus the query string.
You could eliminate the intermediate variable, uri:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "exportdata" } {
pool Servers_Pool member 192.168.1.10 80
}
}
Aaron
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