Forum Discussion
Antony2015
May 14, 2015Altostratus
rewrite iRule
How to write the below iRule if I want to use the two events together ?
event&Condition:when CLIENT_ACCEPTED {
Client IP:[IP::client_addr] equals 10.0.0.0/8
} when HTTP_REQUEST { if { [string tolower [HTTP::header User-Agent]] contains "/Firefox" or "/Chrome" or "/Opera" or "/safari" }
ActionThe action is to rewrite the URI.
-reqUrlFrom "https://www.f5.com/citrix/wwl_prodweb/" -reqUrlInto "https://www.f5.com/citrix/wwl_prodwebExplicit/"
Any help would be highly appreciated !
- nitassEmployee
is it something like this?
when HTTP_REQUEST { if { [IP::addr [IP::client_addr] equals 10.0.0.0/8] } { if { [HTTP::uri] equals "/citrix/wwl_prodweb/" } { switch -glob [HTTP::header "User-Agent"] { "*Firefox*" - "*Chrome*" - "*Opera*" - "*safari*" { HTTP::redirect "http://[HTTP::host]/citrix/wwl_prodwebExplicit/" } default { User-Agent is not FF, Chrome, Opera, safari Do something } } } else { URI is not equal to /citrix/wwl_prodweb/ Do something } } else { IP is not in 10.0.0.0/8 subnet Do something } }
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