Forum Discussion
Daniel_Ma_23954
Nimbostratus
May 02, 2016iRule Question - https to https://www
Currently I have an iRule in place that does uses switch to do a web site redirect and a http to https redirect on a http VIP, see below.
when HTTP_REQUEST {
switch -glob [string tolower [HTT...
Yann_Desmarest
Cirrus
May 02, 2016Hello,
The irule that use a switch will cause a loop when doing requests with www.def.com hostname
I suggest this :
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"def.com" {
HTTP::redirect https://www.def.com[HTTP::uri]
}
"www.def.com" {
do nothing
}
default {
reject
}
}
}
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
