Forum Discussion
MikeyG
Feb 04, 2021Nimbostratus
iRule creation based on URI
disclaimer, I do not know iRules for anything......but I have been asked to create on for the following. here are my requirements, iRule to redirect traffic . 1. if this = https://abc.help.com/supp...
Hi MikeyG,
when HTTP_REQUEST {
if { [HTTP::host] equals "abc.help.com" } {
switch -glob [string tolower [HTTP::uri]] {
"/support/case/v2/webcase*" { HTTP::redirect https://sa.abcs.help.com[HTTP::uri] }
"/hbservices/abc/v1/asset*" { HTTP::redirect https://hb.abcs.help.com[HTTP::uri] }
"/support/assetinfo/v4/getassetwarranty*" { HTTP::respond 404 content "404 Page Not Found" }
default { HTTP::redirect https://abc2.us.help.com[HTTP::uri] }
}
}
}
MikeyG
Feb 05, 2021Nimbostratus
Thank you, i am getting better but I just do not do them very often.
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