Forum Discussion
DarkSideOfTheQ_
Nimbostratus
Feb 23, 2009HTTPS rewrite???
Hello All,
I have two vips setup, one for http and one for https. I've put in place an http to https redirect on the http vip and it is working as expected.
when HTTP_REQUEST {
if {...
The_Bhattman
Nimbostratus
Feb 23, 2009When you look at [HTTP::host] it's going to be true if it looks like this
https://test.domain.com/app/login.do
or
https://test.domain.com
or
https://test.domain.com/whatever/
This is why it's going to keep redirecting and looping through the same irule
What you need to do is determine if there is a uri, meaning "/app/login.do"
So you rewrite the logic
when HTTP_REQUEST {
if { ([HTTP::host] equals "test.domain.com") and [HTTP::uri] equals "/" } {
HTTP::redirect https://test.domain.com/app/login.do
}
}
This should then only trigger the redirect when the request hits the vip as http(s)://test.domain.com/
hope this helps
CB
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