Forum Discussion
Habib_Ulla_Khan
Nimbostratus
Dec 19, 2016Irule 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
}
1 Reply
- Vijay_E
Cirrus
Can you use CURL to identify the HTTP response ? What is the request and what is the response that you are getting ?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
