Forum Discussion
f5_rocks
Nimbostratus
May 06, 2016I'm trying to write an irule with multiple not scripts in it
I'm trying to write an irule with multiple not scripts in it
Stanislas_Piro2
Cumulonimbus
May 09, 2016Hi,
you can try to use array to define old and new hostnames:
when RULE_INIT {
array set static::NewURL {
m3.companyname a1.m3.companyname
internal.m3.companyname internal.a1.m3.companyname
internal.m3-dc1.companyname internal.a1.m3-dc1.companyname
internal.m3-dc2.companyname internal.a1.m3-dc2.companyname
internal.m3-dc3.companyname internal.a1.m3-dc3.companyname
}
}
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/abcd/web/abcdpayment.web/*" -
"/abcd/web/abcdpaymentprocessing.web/*" {}
"/abcd/*" {
if {[info exists static::NewURL([HTTP::host])]} {HTTP::redirect http://$static::NewURL([HTTP::host])[string tolower [HTTP::uri]]}
}
}
}
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