Forum Discussion
shawn306_84070
Nimbostratus
Jun 24, 2013Simple I rule redirect
Hello,
I have created a vip that used http redirect to https. Right now I am using the default redirect irule
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri] ...
Kevin_Stewart
Employee
Jun 24, 2013I believe that SHOULD work. You may want to throw in some logging to see what the BIG-IPs sees as the [HTTP::host] value, but otherwise:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "abc" } {
HTTP::redirect "https://abc.com[HTTP::uri]"
} else {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}
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