Forum Discussion
gh0std0g_79292
Jun 20, 2012Nimbostratus
need http redirect and then pool selection based on local port
irule noob here... but i'll describe what i'm trying to accomplish followed by my weak attempt at solving it through an irule... -a user goes to http://page.example.com -they get redirec...
hooleylist
Jun 25, 2012Cirrostratus
You will probably want to add a default case to the iRule else you risk dropping requests for URIs which don't contain configurator or are exactly /. You can also use a switch statement to check the URI.
I don't understand the exact scenario, but you should be able to figure out more about what's happening by adding logging and using a browser plugin that lets you check the requests the client sends and the responses it receives.
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] to [HTTP::host][HTTP::uri]"
switch -glob [HTTP::uri] {
"*configurator*" {
pool poolB
log local0. "[IP::client_addr]:[TCP::client_port]: Matched configurator, selecting poolB"
}
"/" {
HTTP::uri "/QITF/faces/portal"
pool poolA
log local0. "[IP::client_addr]:[TCP::client_port]: Matched /, selecting poolA"
}
default {
pool poolX
log local0. "[IP::client_addr]:[TCP::client_port]: Matched default, selecting poolX"
}
}
}
when HTTP_RESPONSE {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::status] from [LB::server] (redirect? [HTTP::header Location])"
}
What is Fiddler? Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet
www.fiddler2.com/
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