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 12, 2015I think this rule should work, though I'd make a couple tweaks.
when HTTP_REQUEST {
switch -glob -- [string tolower [HTTP::uri]] {
"*/admin*"} {
HTTP::host should be fine as long as you're using the default port. If you use a different port than default, you'll need to parse the host.
If you know you're already on HTTPS, you could just use "/someother/index" too
HTTP::redirect "https://[HTTP::host]/someother/index"
return
}
"*/someother/index*" {
pool MY-ADMIN-POOL
}
default {
pool MY-OTHER-POOL
}
}
}
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