Forum Discussion
Nick_Coelho_338
Nimbostratus
Mar 03, 2007iRule works but getting browser error, help!
need an iRule that looks for trafficui and gives pool but if it does not see trafficui it looks for the hostname and redirects
it seems to work but i get errors on the "test1.com" links. bet...
Nick_Coelho_338
Nimbostratus
Mar 07, 2007is there a better way to get this done? i tried a switch - glob [HTTP::uri] and then switch - glob [HTTP:host] but it just skipped right over the uri section
this is working but does not look very scalable
when HTTP_REQUEST {
if {[string tolower [HTTP::uri]] starts_with "/trafficui" } {
pool trafficui
} elseif {[string tolower [HTTP::uri]] starts_with "/testuri" } {
HTTP::redirect "http://www.testuri.com/TrafficUI/mscui/Page.aspx?pgid=598"
} else {
switch -glob [string tolower [HTTP::host]] {
"test1.com" -
"*.test1.com" {
HTTP::redirect "http://wwv.test1.com/trafficui/mscui/page.aspx?cid=1&ptid=10"
}
"test2.com" -
"*.test2.com" {
HTTP::redirect "http://www.test2.com/TrafficUI/mscui/page.aspx?cid=1&ptid=5"
}
default {
HTTP::redirect "http://www.test3.com/TrafficUI/mscui/page.aspx?cid=1&ptid=4&utcoffset=5"
}
}
}
}
much appreciated
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