One VIP with two URLs redirecting to two URIs
Hi
I'm new with Irules so there's probably something small amiss here. I want the Irule to detect the difference between these two URLs and redirect it accordingly to the correct URL and URI.
smartit.xyz.com -> https://smartit.xyz.com/ux/smart-it// myit.xyz.com -> https://myit.xyz.com/ux/myitapp//
I also have a VIP on port 80 that redirects it to become HTTPS.
Any ideas ?
when HTTP_REQUEST { if { [HTTP::host] equals "smartit.xyz.com" and {[HTTP::uri] equals "/" }} { HTTP::redirect "https://smartit.xyz.com/ux/smart-it//" } if { [HTTP::host] equals "myit.xyz.com" and {[HTTP::uri] equals "/" }} { HTTP::redirect "https://myit.xyz.com/ux/myitapp//" }
}
Port 80 VIP
when HTTP_REQUEST { HTTP::redirect "https://[HTTP::host][HTTP::uri]" }