For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Kareem's avatar
Kareem
Icon for Nimbostratus rankNimbostratus
Mar 06, 2014

Is it possible to attach an irule to an HTTPS virtual server ?

Hi,

I am trying to combine two irules together and having no luck. Can someone help ? The details are as follows: One rule is for http to https redirect while the second irule is for fallback page to be displayed if the original web page goes down. 1) http to https redirect when HTTP_REQUEST { string tolower [HTTP::host] if {[HTTP::host] contains "maximoqa.cenovus.com" }{ HTTP::redirect https://[HTTP::host]/maximo/ } else { HTTP::redirect https://[HTTP::host].cenovus.com/maximo/ } }

2) Use the LTM as a webserver as a lite version of a maintenance page. Like a fallback page when HTTP_REQUEST {

sets the timer to return client to host URL set stime 10

Use the Host header value for the responses if it's set. If not, use the VIP address. if {[string length [HTTP::host]]}{ set host [HTTP::host] } else { set host [IP::local_addr] }

Check if the URI is /maintenance switch [HTTP::uri] { "/maintenance" {

      Send an HTTP 200 response with a Javascript meta-refresh pointing to the host using a refresh time
     HTTP::respond 200 content \

"Maintenance page \

Sorry! This site is down for maintenance.

" "Content-Type" "text/html" return } } If the pool_testLB is down, redirect to the maintenance page if { [active_members pool_testLB] < 1 } { HTTP::redirect "http://$host/maintenance" return } }

18 Replies