Forum Discussion
f51
Cumulonimbus
Aug 16, 2017Endless Redirction Loop
Hi DC,
One VIP configured on port 80 and now we want to use on port 443. So when I created VIP on 443 and added redirection irule for VIP:80. But when I am trying to access the https://abc.exper...
cjunior
Nacreous
Aug 16, 2017It looks like you are in this scenario:
1: Client request VS:80
2. VS:80 send redirect to VS:443 3. VS:443 does SSL offload and send clear traffic to a pool member 4. Pool member send clear traffic redirect to http://abc.expert.com, and it start the loop.So, you may need to rewrite the pool member response to https traffic, like this:
when HTTP_REQUEST {
STREAM::disable
set host [getfield [HTTP::host] ":" 1]
}
when HTTP_RESPONSE {
if { [HTTP::header value Content-Type] contains "html" } {
STREAM::expression "@http://$host@https://$host@"
STREAM::enable
}
if { [HTTP::is_redirect] && [string tolower [HTTP::header Location]] starts_with "http://$host"} {
HTTP::header replace Location [string map -nocase "http://$host https://$host" [HTTP::header Location]]
}
}
Here in DC have many examples that you can use 🙂
Regards.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