Forum Discussion
Sonny
Cirrus
May 21, 2008http to https redirect EXCEPTION
I current have this iRule that forces http to https traffic.
when HTTP_REQUEST {
HTTP::redirect "https://XXX.DOMAIN.com/"
}
Question: What would be the best way to add an exception?
I.E. Say I want EXCLUDE this URL, "http://XXX.DOMAIN.com/utilities/".
4 Replies
- Sonny
Cirrus
Thanks for the reply! I think this simple rule will work, too. What do you guys think?
when HTTP_REQUEST {
if {[HTTP::uri] ends_with "utilities"}{
pool pool_XXX
}
else
HTTP::redirect "https://XXX.DOMAIN.com/"
} - Sonny
Cirrus
Forgot a close } at the end... So...
when HTTP_REQUEST {
if {[HTTP::uri] ends_with "utilities"}{
pool pool_XXX
}
else
HTTP::redirect "https://XXX.DOMAIN.com/"
}
} - Sonny
Cirrus
Thanks aherrman! I think the "starts_with" would be better since I do want everything under it from being redirected bc the program already does so... - Andy_Herrman_22
Nimbostratus
Glad I could help.
Just want to make sure you noticed the "/" before "utilities" in my example. The URI will start with "/" since it's everything after the host.
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
