Forum Discussion
TJ_Vreugdenhil
Sep 15, 2011Cirrus
Combine two iRules
Hi - I am trying to combine two iRules on 9.x.
I believe a switch -glob statement would be appropriate, but not sure how do it with two different HTTP::'operators.'
when HTT...
nitass
Sep 15, 2011Employee
pls feel free to revise.
[root@orchid:Active] config b virtual bar80 list
virtual bar80 {
snat automap
pool foo80
destination 172.28.17.88:http
ip protocol tcp
rules myrule
profiles
http
tcp
}
[root@orchid:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "nice" and [string tolower [HTTP::uri]] ne "/niku/app"} {
HTTP::redirect "https://nice.testmarketing.com[HTTP::uri]"
}
}
}
[root@orchid:Active] config curl -I http://nice/niku/app
HTTP/1.1 404 Not Found
Date: Thu, 15 Sep 2011 17:12:10 GMT
Server: Apache/2.0.59 (rPath)
Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1
[root@orchid:Active] config curl -I http://nice/abc
HTTP/1.0 302 Found
Location: https://nice.testmarketing.com/abc
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
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