Forum Discussion
satish_txt_2254
Cirrus
Nov 02, 2017redirect https to other https with condition
I have following iRules, its bind with virtual server
VS_HTTPS
i wants if someone tyle https://devs.example.com
then it should redirect to https://dev.example.com
i have tried following but it didn't work.
in DNS dev and devs are both CNAME and they pointing to same F5 VIP
when HTTP_REQUEST {
if { ([HTTP::host] eq "dev.example.com") or ([HTTP::host] eq "devs.example.com") } {
devs -> dev
HTTP::redirect https://dev.example.com[HTTP::uri]
pool dev_pool
} elseif { [HTTP::host] eq "qa.example.com" } {
pool qa_pool
}
}
I am getting following error
$ curl -Ik https://devs.vivox.com
HTTP/1.0 302 Found
Location: https://dev.vivox.com/
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
2 Replies
Sort By
- Stanislas_Piro2
Cumulonimbus
Hi,
What is the error in curl command?
Redirect always respond with 302 status code and location header equal to redirect uri.
- Amresh008
Nimbostratus
Satish, Did you try sending the traffic through web interface, and saw redirection ?
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