Forum Discussion
GerardoF83_3196
Nimbostratus
May 04, 2017URL Redirect Parse
Hi Guys
I'm totally new at this, so I'm trying the following and I'm not sure if an iRule will do it
I need to redirect as below
http://abc.qwe.com/ghj/qwe/12345
to
http://mn...
JG
Cumulonimbus
May 04, 2017Here's one [untested] :
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "abc.qwe.com" } {
switch -glob -- [HTTP::path] {
"/ghj/qwe/*" {
HTTP::redirect http://mnb.lkj.com/asd/qaz/wsx/edc/[getfield [HTTP::path] "/" 4]
}
"/" -
"/ghj/" {
HTTP::redirect http://mnb.lkj.com
}
}
}
}
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
