williehood_2622
Aug 23, 2018Nimbostratus
irule redirect pool uri http or https
I'm writing irule, I have two pools one for hhtps traffic and one for http traffic. I would like to have irule that based on uri "ex ; goes to http on pool1 any other port 80 redirects to https pool 2.
/Content pool1 http://www.example.com/Content, else pool2 https://www.example.com
when HTTP_REQUEST { switch [string tolower [HTTP::uri]] {
“/content” { pool unsecure_80 HTTP::redirect "http://[HTTP::host][HTTP::uri]" } "default" { pool secure } HTTP::redirect "http://[HTTP::host][HTTP::uri]"
} }