Forum Discussion
Deniz_112317
Nimbostratus
Nov 14, 2011iRule is resulting in error 404 after execution
I have the following irule configured to pass traffic to our app servers...
when HTTP_REQUEST {
set uri [HTTP::uri]
if { $uri starts_with "/firstEnv" } {
pool firstEnv ...
hoolio
Cirrostratus
Nov 14, 2011Can you add a OneConnect profile to the virtual server and retest? If you're using SNAT you can use the default OneConnect profile. If you're not doing serverside source address translation, you should create a custom OneConnect profile with a /32 source mask.
Here's an iRule which should give better performance than the if/elseif/.../else chain:
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/firstEnv*" {
pool firstEnv
log local0. "[IP::client_addr]:[TCP::client_port]: pool firstEnv for [HTTP::uri]"
}
"/secondEnv*" {
pool secondEnv
log local0. "[IP::client_addr]:[TCP::client_port]: pool secondEnv for [HTTP::uri]"
}
"/thirdEnv*" {
pool thirdEnv
log local0. "[IP::client_addr]:[TCP::client_port]: pool thirdEnv for [HTTP::uri]"
}
default {
HTTP::redirect "https://[HTTP::host]/firstEnv"
log local0. "[IP::client_addr]:[TCP::client_port]: Redirecting for [HTTP::uri]"
}
}
}
when HTTP_RESPONSE {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::status] response"
}
Aaron
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