Forum Discussion
Malcolm_Salmons
Nimbostratus
Oct 12, 2005HTTP to HTTPS redirect
Hi
I've currently got a Virtual Server running https, e.g.
https://test.abc.com
This is all working correctly and load balancing happily. However I want to enable redirec...
Oct 12, 2005
Try removing the brackets around the HTTP::redirect command
when HTTP_REQUEST {
if { [HTTP::host] eq "test.abc.com"} {
HTTP::redirect "https://test.abc.com/"
}
}The square brackets evaluate the command inside the brackets and then place the result where the brackets are. You want to execute the command so you'll want to not include the brackets.
*** Update ***
I forgot to mention (as rapmaster_c did below) that you'll want to be checking based on HTTP::host and not HTTP::uri. I've updated the example above.
-Joe
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