Forum Discussion
Is it possible to attach an irule to an HTTPS virtual server ?
Hi,
I currently have the http-to-https irule attached to the port 80 VIP and it works perfectly. I have a second irule attached to the HTTPS VIP but it does not work.
Below is the irule : 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 } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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