Forum Discussion
James_Millsap_4
Nimbostratus
Jun 24, 2013Traffic routing with iRules
Ok, some time ago we started a project to move our extremely large websites to a new platform. Instead of rewriting them all, the would be slowly rolled out. This worked fine for subdirectories und...
James_Millsap_4
Nimbostratus
Jun 28, 2013Excellent this works really well. My only concern is if they have on separate subdomains duplicated URI's. like on one subdomain they want /index.html to be direct to the legacy server, but want it to go through to new production on another subdomain. Would something like this work?
when HTTP_REQUEST {
set hostlist1 [list email.example.com www.example.com test.example.com test1.example.com]
set hostlist2 [list staff.example.com owa.example.com external.example.com test2.example.com]
if { [string tolower [HTTP::host]] equals "testwww.example.com" } {
pool $HTTP_pool }
elseif { [lsearch $hostlist1 [string tolower [HTTP::host]]] ne -1 } {
switch -glob [string tolower [HTTP::uri]] {
...
}
}
elseif { [lsearch $hostlist2 [string tolower [HTTP::host]]] ne -1 } {
switch -glob [string tolower [HTTP::uri]] {
...
}
}
}
Not sure, what do you think?
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