Forum Discussion
Jon_14_147267
Jul 23, 2016Nimbostratus
iRule TLSv1.2 Redirect Page
I've created an iRule that builds out the redirect page we want to send people to if there browser isn't using TLSv1.2 and it works if I hit the url directly i.e. https://www.oursite.com or by typing...
Yann_Desmarest
Jul 25, 2016Cirrus
Hi,
You can also use URI::basename instead of HTTP::uri so you don't care of the path :
if { [SSL::cipher version] ne "TLSv1.2" } {
log local0. "Client from IP: [IP::client_addr] is using [SSL::cipher version], which is not TLS1.2 so redirected to maintenance page"
switch [URI::basename [HTTP::path]] {
"/fceLogo.png" { HTTP::respond 200 content [ifile get "fceLogo_png"] "Content-Type" "image/png" }
"/fceHeader.jpg" { HTTP::respond 200 content [ifile get "fceHeader"] "Content-Type" "image/jpeg" }
"/chromeLogo.png" { HTTP::respond 200 content [ifile get "chromeLogo"] "Content-Type" "image/png" }
"/firefoxLogo.png" { HTTP::respond 200 content [ifile get "firefoxLogo"] "Content-Type" "image/png" }
"/ieLogo.png" { HTTP::respond 200 content [ifile get "ieLogo"] "Content-Type" "image/png" }
"/safariLogo.png" { HTTP::respond 200 content [ifile get "safariLogo"] "Content-Type" "image/png" }
"/fceFooterLogo.png" { HTTP::respond 200 content [ifile get "fceFooterLogo"] "Content-Type" "image/png" }
default { HTTP::respond 200 content [ifile get FarmCreditEastTLS ] "Content-Type" "text/html" }
}
}
else {
log local0. "The connection was initiated using TLSv1.2 and it was successful!!"
}
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