Forum Discussion
Gill_32697
Nimbostratus
Jan 31, 2017Add elseif is to iRule syntax errors
This iRule was working originally but now I need to add a If in the beginning and move /mrgram to an esleif...I cant get the syntax working, I could use some help..
Logic is...
1. If uri starts with ...
crodriguez
Jan 31, 2017Ret. Employee
Try this notation:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/WebTrans/webs.aspx*" } {
HTTP::redirect "https://othersite.bigfcu.org/"
} elseif { [string tolower [HTTP::uri]] starts_with "/mgram/mgram.asmx" } {
if { not ( [IP::addr [IP::client_addr] equals "10.10.10.10"] or [IP::addr [IP::client_addr] equals "20.20.20.20"] or [IP::addr [IP::client_addr] equals "30.30.30.30"] ) } {
HTTP::redirect "https://[HTTP::host]/"
}
}
}
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