Forum Discussion
adrian_171483
Cirrus
Jan 12, 2015will this irule work?
Need a rule to do this :
client comes into the VS with "/admin" in the URI.. if they have /admin then want to be redirected to come back with /someother/index in the URI and drop into the ADMI...
Michael_Jenkins
Cirrostratus
Jan 15, 2015try this. Noticed I had an extra } in the one above. Sorry about that...
when HTTP_REQUEST {
log local0. "URI: [HTTP::uri]"
switch -glob -- [string tolower [HTTP::uri]] {
"/admin*" {
log local0. " Redirect to /hawtio/index"
HTTP::redirect "/hawtio/index"
return
}
"/hawtio/index*" {
log local0. " Set pool to MY-ADMIN-POOL"
pool MY-ADMIN-POOL
}
default {
log local0. " Set pool to MY-OTHER-POOL"
pool MY-OTHER-POOL
}
}
}
when HTTP_RESPONSE {
log local0. " Response code: [HTTP::status]"
}
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