Forum Discussion
irule redirect without changing host on client
Hoping you can clarify something. Let's take the two examples:
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"/my/application/_" {
pool application_pool
HTTP::uri [string range [HTTP::uri] 3 end ]
}
"/test/other/_" {
pool test_pool
HTTP::uri [string range [HTTP::uri] 5 end ]
}
default {
pool other_pool
}
}
}
In this iRule, if the user makes a request for "/my/application/_", you change the URI inline to "/application/_" and then send the request to the application_pool. Any request to say, "/application/layout.css" would go to the other_pool.
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"/my/application/_" {
HTTP::redirect "http://10.1.1.12[string range [HTTP::uri] 3 end]"
}
"/test/other/_" {
HTTP::redirect "http://10.1.1.13[string range [HTTP::uri] 5 end]"
}
default {
pool other_pool
}
}
}
In this iRule, if the user makes a request to "/my/application/_", he is immediately redirected to "http://10.1.1.12/application/_", which is caught by the default condition and sent to the other_pool. Any request to say, "/application/layout.css" would go to the other_pool.
So a few questions:
-
Do the same servers exist in the application_pool and other_pool?
-
What would a CSS URI look like?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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