Forum Discussion
Patrick_McGlyn1
Jun 15, 2010Nimbostratus
Application migration iRule
I am trying to write an iRule to migrate applications from an old web farm pool to a new web farm pool. The web servers are setup to run multiple
application instances on the same IP and Port.
F...
The_Bhattman
Jun 15, 2010Nimbostratus
Hi Patrick,
From what I can tell you could do the following
class redirectapp {
"/app1/login.html /psp/app1/?cmd=login"
"/app2/login.html /psp/app2/?cmd=login"
"/app3/login.html /psp/app3/?cmd=login"
}
when HTTP_REQUEST {
set uriredirected [findclass [string tolower[HTTP::uri]] $::redirectapp " "]
if {$uriredirected ne "" } {
HTTP::redirect "http://www.domain.com/$uriredirected"
pool new_server_pool-8001
}
}
This means if someone enters
http://something.com/app1/login.html it will be redirected to /psp/app1/?cmd=logi
or if someone enters
http://something.com/app2/login.html it will be redirected to /psp/app2/?cmd=logi
or if someone enters
http://something.com/app3/login.html it will be redirected to /psp/app3/?cmd=logi
is this what were looking for?
Bhattman
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