Habib_Ulla_Khan
Dec 19, 2016Nimbostratus
Irule to redirect when request is https.
Hi All,
I am using below mentioned irules. when using http i can see it redirects to https for telecombil.calls.com and also uri is appended. When i use https directly i dont get redirection working and page is not displayed.
**http irule:**
when HTTP_REQUEST {
if { [HTTP::host] equals "telecombil.calls.com" } {
HTTP::redirect "https://telecombil.calls.com/staff"
} else {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
**Below is the irule use in https VIP**
when HTTP_REQUEST {
Check requested host header (set to lowercase)
switch -glob [string tolower [HTTP::host]] {
"telecombills.calls.com" {
SSL::disable serverside
if { [string tolower [HTTP::host]] equals "telecombil.calls.com" } {
HTTP::redirect "https://telecombil.calls.com`text`/staff"
pool telecombills-pool-http
}
"cam.calls.com" {
SSL::enable serverside
pool cam-https-pool
}
"toolboxremote.calls.com" {
SSL::disable serverside
pool toolboxremote-pool
}