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 something like https://www.oursite.com/locations/gohere.
However, if I do a google search and click on the link from the search results for https://www.oursite.com/locations/gohere it will redirect to my TLSv1.2 page but the images don't display. if I view the link of an image it says https://www.oursite.com/locations/gohere/logo.png.
Is there a way to handle this so if someone does do a google search and clicks on a link, the redirect page along with the images will display no matter where the page they are trying to get to is in the site structure?
Here's the iRule code: when HTTP_REQUEST {
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 [HTTP::uri] {
"/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!!"
}
}
Thanks.