Forum Discussion
RonR10_181817
Dec 08, 2016Nimbostratus
Brocade Stringray rule to iRule migration
Hi all - I am trying to migrate a Brocade Stingray rule to an iRule. My iRule skills are basic so any help is greatly appreciated to review my approach. This Stingray rule is configured on 2 virtual...
Kai_Wilke
Dec 08, 2016MVP
Hi Ron,
you may try the iRule below...
HTTP iRule:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "gsd.test.com" } then {
Redirecting requests to http://gsd.test.com/* to https://gsd.test.com/*
HTTP::redirect "https://[getfield [HTTP::host] ":" 1][HTTP::uri]"
}
}
HTTPS iRule:
when HTTP_REQUEST {
if { ( [string tolower [HTTP::host]] equals "gsd.test.com" ) } then {
if { [string tolower [HTTP::path]] equals "/" } then {
HTTP::redirect "/gsd/login"
} else {
pool Test_Pool
}
set set_sso_cust_cookie 1
}
}
when HTTP_RESPONSE {
if { [info exists set_sso_cust_cookie] } then {
HTTP::header insert "Set-Cookie" "sso_cust=gsd;Secure;HTTPOnly;Path=/;Domain=test.com"
unset -nocomplain set_sso_cust_cookie
}
}
Cheers, Kai
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